* @return {@link UserAccountBean}
*/
public static final UserAccountBean convertSecondaryUserToUserBean(
final UserAccount secUserSecondary) {
System.out.println("convertSecondaryUserToUserBean --->"+ secUserSecondary);
final UserAccountBean unitUserBean = new UserAccountBean();
if (secUserSecondary != null) {
unitUserBean.setId(secUserSecondary.getUid());
unitUserBean.setName(secUserSecondary.getCompleteName());
unitUserBean.setEmail(secUserSecondary.getUserEmail());
unitUserBean.setUsername(secUserSecondary.getUsername());
unitUserBean.setStatus(secUserSecondary.isUserStatus());
if (secUserSecondary.getGroup() != null) {
unitUserBean.setGroupBean(convertGroupDomainToBean(secUserSecondary.getGroup()));
}
unitUserBean.setActivated(secUserSecondary.getInviteCode() == null ? true : false);
unitUserBean.setGroupId(secUserSecondary.getGroup() == null ? null
: secUserSecondary.getGroup().getGroupId());
if (secUserSecondary.getSecUserPermissions() != null) {
unitUserBean.setListPermission(convertSetToUnitPermission(secUserSecondary.getSecUserPermissions()));
}
// System.out.println("Convert Enjoy Date "+secUserSecondary.getEnjoyDate());
unitUserBean.setDateNew(secUserSecondary.getEnjoyDate());
// System.out.println("Convert Enjoy Date 1"+unitUserBean.getDateNew());
unitUserBean.setIpLastLogged(secUserSecondary.getLastIpLogged());
unitUserBean
.setLastTimeLogged(secUserSecondary.getLastTimeLogged());
}
return unitUserBean;
}