private PasswordEncoder passwordEncoder;
public List<SeteUserVo> loadAllSeteUsers() {
List<SeteUser> users = seteUserDao.getAllSeteUsers();
List<SeteUserVo> userVos = new ArrayList<SeteUserVo>();
SeteUserVo vo = null;
for(SeteUser su : users) {
vo = new SeteUserVo();
vo.setFirstName(su.getFirstName());
vo.setMiddleName(su.getMiddleName());
vo.setLastName(su.getLastName());
vo.setLoginName(su.getLoginName());
if(su.getDateOfBirth() != null && !su.getDateOfBirth().equals("")){
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
vo.setDateOfBirth(sdf.format(su.getDateOfBirth()));
}
else{
vo.setDateOfBirth("");
}
if(su.getContactInformation() != null) {
vo.setAddress(su.getContactInformation().getAddress());
vo.setEmailAddress(su.getContactInformation().getEmailAddress());
vo.setPhoneNumber(su.getContactInformation().getPhoneNumber());
}
// do user Role
List<UserRolePrivilege> rolePrivs = new ArrayList<UserRolePrivilege> (su.getUserRolePrivileges());
List<String> userRoles = new ArrayList<String>();
for(UserRolePrivilege urp: rolePrivs)
{
userRoles.add(urp.getUserRoleType().getLabel());
}
vo.setUserRoles(userRoles);
//massage for Privileges
userVos.add(vo);
}