ci.setEmailAddress(eaddr);
ci.setPhoneNumber(pn);
user.setContactInformation(ci);
Set<UserRolePrivilege> rolePrivs = new HashSet<UserRolePrivilege>();
UserRolePrivilege p = new UserRolePrivilege();
p.setUserRoleType(TypeUtil.forKey(UserRoleType.class, roleKey));
Set<UserPrivilege> privs = new HashSet<UserPrivilege>();
UserPrivilege up = null;
for(String pk : privKeys) {
up = new UserPrivilege();
up.setUserPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class, pk));
for(String ak : actionKeys) {
up.setPrivilegeActionType(TypeUtil.forKey(PrivilegeActionType.class, ak));
}
privs.add(up);
}
p.setUserPrivileges(privs);
rolePrivs.add(p);
user.setUserRolePrivileges(rolePrivs);
baseDao.saveOrUpdate(user);
}