package com.cin.dto;
import java.io.Serializable;
import com.cin.entity.Migration;
public class MigrationDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String migrationCode;
private String migrationDistance;
private String migrationMove;
private String migrationFromSunBelt;
public MigrationDTO() {
}
public MigrationDTO(Migration entity) {
this.setMigrationCode( entity.getMigrationcode() );
this.setMigrationDistance( entity.getMigrationdistance() );
this.setMigrationFromSunBelt( entity.getMigrationfromsunbelt() );
this.setMigrationMove( entity.getMigrationmove() );
}
/**
* @return the migrationCode
*/
public String getMigrationCode() {
return migrationCode;
}
/**
* @param migrationCode the migrationCode to set
*/
public void setMigrationCode(String migrationCode) {
if( migrationCode == null ){
this.migrationCode = null;
} else {
this.migrationCode = migrationCode.trim();
}
}
/**
* @return the migrationDistance
*/
public String getMigrationDistance() {
return migrationDistance;
}
/**
* @param migrationDistance the migrationDistance to set
*/
public void setMigrationDistance(String migrationDistance) {
if( migrationDistance == null ){
this.migrationDistance = null;
} else {
this.migrationDistance = migrationDistance.trim();
}
}
/**
* @return the migrationMove
*/
public String getMigrationMove() {
return migrationMove;
}
/**
* @param migrationMove the migrationMove to set
*/
public void setMigrationMove(String migrationMove) {
if( migrationMove == null ){
this.migrationMove = null;
} else {
this.migrationMove = migrationMove.trim();
}
}
/**
* @return the migrationFromSunBelt
*/
public String getMigrationFromSunBelt() {
return migrationFromSunBelt;
}
/**
* @param migrationFromSunBelt the migrationFromSunBelt to set
*/
public void setMigrationFromSunBelt(String migrationFromSunBelt) {
if( migrationFromSunBelt == null ){
this.migrationFromSunBelt = null;
} else{
migrationFromSunBelt = migrationFromSunBelt.trim();
}
}
public Migration toEJB(int ssn){
Migration ejb = new Migration();
ejb.setMigrationcode(migrationCode);
ejb.setMigrationdistance(migrationDistance);
ejb.setMigrationfromsunbelt(migrationFromSunBelt);
ejb.setMigrationmove(migrationMove);
ejb.setSsn(ssn);
return ejb;
}
}