entityManager.persist(user);
}
public void updateUser(User user, String departmentid, String positionid) {
if (departmentid != null && !departmentid.equals("")) {
Department depart = entityManager.find(Department.class, Long
.valueOf(departmentid));
user.setDepartment(depart);
}
if (positionid != null && !positionid.equals("")) {
Position pos = entityManager.find(Position.class, Long