private static ExportedRole toExportedRole(final SRole sRole) { final ExportedRole role = new ExportedRole(sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); return role; }
private static ExportedRole toExportedRole(final SRole sRole) { final ExportedRole role = new ExportedRole(sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); return role; }
protected EntityUpdateDescriptor getRoleDescriptor(final SRole existingRole, final ExportedRole exportedRole) { final SRoleUpdateBuilder roleUpdateBuilder = BuilderFactory.get(SRoleUpdateBuilderFactory.class).createNewInstance(); final String name = exportedRole.getName(); if (name != null && !name.equals(existingRole.getName())) { roleUpdateBuilder.updateName(name); } final String description = exportedRole.getDescription(); if (description != null && !description.equals(existingRole.getDescription())) { roleUpdateBuilder.updateDescription(description); } final String displayName = exportedRole.getDisplayName(); if (displayName != null && !displayName.equals(existingRole.getDisplayName())) { roleUpdateBuilder.updateDisplayName(displayName); } return roleUpdateBuilder.done(); }
protected EntityUpdateDescriptor getRoleDescriptor(final SRole existingRole, final ExportedRole exportedRole) { final SRoleUpdateBuilder roleUpdateBuilder = BuilderFactory.get(SRoleUpdateBuilderFactory.class).createNewInstance(); final String name = exportedRole.getName(); if (name != null && !name.equals(existingRole.getName())) { roleUpdateBuilder.updateName(name); } final String description = exportedRole.getDescription(); if (description != null && !description.equals(existingRole.getDescription())) { roleUpdateBuilder.updateDescription(description); } final String displayName = exportedRole.getDisplayName(); if (displayName != null && !displayName.equals(existingRole.getDisplayName())) { roleUpdateBuilder.updateDisplayName(displayName); } return roleUpdateBuilder.done(); }
public static Role toRole(final SRole sRole) { final RoleImpl role = new RoleImpl(sRole.getId(), sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); role.setIconId(sRole.getIconId()); role.setCreatedBy(sRole.getCreatedBy()); role.setCreationDate(new Date(sRole.getCreationDate())); role.setLastUpdate(new Date(sRole.getLastUpdate())); return role; }
public static Role toRole(final SRole sRole) { final RoleImpl role = new RoleImpl(sRole.getId(), sRole.getName()); role.setDisplayName(sRole.getDisplayName()); role.setDescription(sRole.getDescription()); role.setIconId(sRole.getIconId()); role.setCreatedBy(sRole.getCreatedBy()); role.setCreationDate(new Date(sRole.getCreationDate())); role.setLastUpdate(new Date(sRole.getLastUpdate())); return role; }