/**
*
*/
package com.cin.dto;
import java.io.Serializable;
import com.cin.entity.Investment;
/**
* @author arunsanjay
*
*/
public class InvestmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
private int capitalGains;
private int capitalLosses;
private int stockDividends;
public InvestmentDTO() {
}
public InvestmentDTO(Investment pEntity) {
setCapitalGains( pEntity.getCapitalgains() );
setCapitalLosses( pEntity.getCapitallosses() );
setStockDividends( pEntity.getStockdividends() );
}
/**
* @return the capitalGains
*/
public int getCapitalGains() {
return capitalGains;
}
/**
* @param capitalGains the capitalGains to set
*/
public void setCapitalGains(int capitalGains) {
this.capitalGains = capitalGains;
}
/**
* @return the capitalLosses
*/
public int getCapitalLosses() {
return capitalLosses;
}
/**
* @param capitalLosses the capitalLosses to set
*/
public void setCapitalLosses(int capitalLosses) {
this.capitalLosses = capitalLosses;
}
/**
* @return the stockDividends
*/
public int getStockDividends() {
return stockDividends;
}
/**
* @param stockDividends the stockDividends to set
*/
public void setStockDividends(int stockDividends) {
this.stockDividends = stockDividends;
}
public Investment toEJB(int ssn){
Investment ejb = new Investment();
ejb.setCapitalgains(capitalGains);
ejb.setCapitallosses(capitalLosses);
ejb.setSsn(ssn);
ejb.setStockdividends(stockDividends);
return ejb;
}
}