public synchronized void save(final OnmsGroup group) throws Exception { Group castorGroup = getGroup(group.getName()); if (castorGroup == null) { castorGroup = new Group(); castorGroup.setName(group.getName()); } castorGroup.setComments(group.getComments()); castorGroup.setUser(group.getUsers().toArray(EMPTY_STRING_ARRAY)); saveGroup(group.getName(), castorGroup); }
public Group map(OnmsGroup inputGroup) { if (inputGroup == null) return null; Group castorGroup = new Group(); castorGroup.setName(inputGroup.getName()); castorGroup.setComments(inputGroup.getComments()); castorGroup.setUser(inputGroup.getUsers().toArray(EMPTY_STRING_ARRAY)); return castorGroup; }