update(ejb);
}
}
public void updateUserJob(UserDTO user)
{
Job ejb = manager.find(Job.class, user.getSsn());
if( ejb == null )
{
ejb = user.getJobDetails().toEJB(user.getSsn());
persist(ejb);
} else {
Industry ind = new Industry();
Occupation occ = new Occupation();
ind.setIndustrycode(user.getJobDetails().getIndustryCode());
occ.setOccupationcode(user.getJobDetails().getOccupationCode());
ejb.setEmployersize(user.getJobDetails().getEmployerSize());
ejb.setIndustry(ind);
ejb.setOccupation(occ);
ejb.setSelfemployed(user.getJobDetails().getSelfEmployed());
ejb.setUnionmember(user.getJobDetails().getUnionMember());
ejb.setWeekwage(user.getJobDetails().getWeekWage());
ejb.setWorkclass(user.getJobDetails().getWorkClass());
ejb.setWorkweeks(user.getJobDetails().getWorkWeeks());
update(ejb);
}
}