protected EntityUpdateDescriptor getGroupDescriptor(final SGroup existingGroup, final ExportedGroup exportedGroup) { final SGroupUpdateBuilder groupUpdateBuilder = BuilderFactory.get(SGroupUpdateBuilderFactory.class).createNewInstance(); final String name = exportedGroup.getName(); if (name != null && !name.equals(existingGroup.getName())) { groupUpdateBuilder.updateName(name); } final String parentPath = exportedGroup.getParentPath(); if (parentPath != null && !parentPath.equals(existingGroup.getParentPath())) { groupUpdateBuilder.updateName(parentPath); } final String description = exportedGroup.getDescription(); if (description != null && !description.equals(existingGroup.getDescription())) { groupUpdateBuilder.updateDescription(description); } final String displayName = exportedGroup.getDisplayName(); if (displayName != null && !displayName.equals(existingGroup.getDisplayName())) { groupUpdateBuilder.updateDisplayName(displayName); } return groupUpdateBuilder.done(); }
protected EntityUpdateDescriptor getGroupDescriptor(final SGroup existingGroup, final ExportedGroup exportedGroup) { final SGroupUpdateBuilder groupUpdateBuilder = BuilderFactory.get(SGroupUpdateBuilderFactory.class).createNewInstance(); final String name = exportedGroup.getName(); if (name != null && !name.equals(existingGroup.getName())) { groupUpdateBuilder.updateName(name); } final String parentPath = exportedGroup.getParentPath(); if (parentPath != null && !parentPath.equals(existingGroup.getParentPath())) { groupUpdateBuilder.updateName(parentPath); } final String description = exportedGroup.getDescription(); if (description != null && !description.equals(existingGroup.getDescription())) { groupUpdateBuilder.updateDescription(description); } final String displayName = exportedGroup.getDisplayName(); if (displayName != null && !displayName.equals(existingGroup.getDisplayName())) { groupUpdateBuilder.updateDisplayName(displayName); } return groupUpdateBuilder.done(); }
private static ExportedGroup toExportedGroup(final SGroup sGroup) { final ExportedGroup group = new ExportedGroup(); group.setName(sGroup.getName()); group.setParentPath(sGroup.getParentPath()); group.setDescription(sGroup.getDescription()); group.setDisplayName(sGroup.getDisplayName()); return group; }
private static ExportedGroup toExportedGroup(final SGroup sGroup) { final ExportedGroup group = new ExportedGroup(); group.setName(sGroup.getName()); group.setParentPath(sGroup.getParentPath()); group.setDescription(sGroup.getDescription()); group.setDisplayName(sGroup.getDisplayName()); return group; }
public static Group toGroup(final SGroup sGroup) { final GroupImpl group = new GroupImpl(sGroup.getId(), sGroup.getName()); group.setParentPath(sGroup.getParentPath()); group.setCreatedBy(sGroup.getCreatedBy()); group.setCreationDate(new Date(sGroup.getCreationDate())); group.setDescription(sGroup.getDescription()); group.setDisplayName(sGroup.getDisplayName()); group.setIconId(sGroup.getIconId()); group.setLastUpdate(new Date(sGroup.getLastUpdate())); return group; }
public static Group toGroup(final SGroup sGroup) { final GroupImpl group = new GroupImpl(sGroup.getId(), sGroup.getName()); group.setParentPath(sGroup.getParentPath()); group.setCreatedBy(sGroup.getCreatedBy()); group.setCreationDate(new Date(sGroup.getCreationDate())); group.setDescription(sGroup.getDescription()); group.setDisplayName(sGroup.getDisplayName()); group.setIconId(sGroup.getIconId()); group.setLastUpdate(new Date(sGroup.getLastUpdate())); return group; }