main/src/main/java/org/onap/policy/pap/main/rest/depundep/ProviderBase.java
/**
     * Updates a group, assigning a new version number, if it actually changes.
     *
     * @param data session data
     * @param group the original group, to be updated
     * @param updater function to update a group
     * @throws PfModelRuntimeException if an error occurred
     */
Updates a group, assigning a new version number, if it actually changes.
@param data session data
@param group the original group, to be updated
@param updater function to update a group
@throws PfModelRuntimeException if an error occurred
Updates a group assigning a new version number if it actually changes . @param data session data @param group the original group to be updated @param updater function to update a group @throws PfModelRuntimeException if an error occurred
private void upgradeGroup(SessionData data, PdpGroup group, BiFunction<PdpGroup, PdpSubGroup, Boolean> updater) {
        boolean updated = false;
        for (PdpSubGroup subgroup : group.getPdpSubgroups()) {
            if (!updater.apply(group, subgroup)) {
                continue;
            }
            updated = true;
            makeUpdates(data, group, subgroup);
        }
        if (updated) {
            data.update(group);
        }
    }
private void upgradeGroup ( SessionData data , PdpGroup group , BiFunction < PdpGroup , PdpSubGroup , Boolean > updater ) { boolean updated = false ; for ( PdpSubGroup subgroup : group . getPdpSubgroups ( ) ) { if ( ! updater . apply ( group , subgroup ) ) { continue ; } updated = true ; makeUpdates ( data , group , subgroup ) ; } if ( updated ) { data . update ( group ) ; } }
Updates a group, assigning a new version number, if it actually changes.
Updates a group assigning a new version number if it actually changes .
// something changed