/** * @param changeSet the change set to add members to * @param loadTuner the load tuner to use */ protected void addMemberObjectsToChangeSet(final ChangeSet changeSet, final LoadTuner loadTuner) { if (!isLoadingMembersEnabled(loadTuner)) { return; } ChangeSetMutator changeSetWithMembers = getChangeSetMutator(changeSet); Collection<BusinessObjectGroupMember> businessObjectGroupMembers = changeSetMemberDao.findGroupMembersByGroupId(changeSet.getGuid()); Collection<BusinessObjectMetadata> memberObjectsMetadata = Collections.emptySet(); if (isLoadingMembersMetadataEnabled(loadTuner)) { memberObjectsMetadata = changeSetMemberDao.findBusinessObjectMetadataByGroupId(changeSet.getGuid()); } Collection<ChangeSetMember> memberObjects = changeSetHelper.convertGroupMembersToChangeSetMembers( businessObjectGroupMembers, memberObjectsMetadata); changeSetWithMembers.setMemberObjects(memberObjects); }
@Override public ChangeSet update(final ChangeSet changeSet, final LoadTuner loadTuner) { if (LOG.isDebugEnabled()) { LOG.debug("Update a change set: " + changeSet); } checkChangeAllowed(changeSet.getGuid()); ChangeSet updatedChangedSet = changeSetDao.update(changeSet); addMemberObjectsToChangeSet(updatedChangedSet, loadTuner); return updatedChangedSet; }