public static void cleanUpFullCopyAssociations(List<VolumeDescriptor> volumeDescriptors,DbClient dbClient){
  List<URI> volumeURIs=VolumeDescriptor.getVolumeURIs(volumeDescriptors);
  for (  URI volumeURI : volumeURIs) {
    Volume volume=dbClient.queryObject(Volume.class,volumeURI);
    URI sourceVolumeURI=volume.getAssociatedSourceVolume();
    if (!NullColumnValueGetter.isNullURI(sourceVolumeURI)) {
      Volume sourceVolume=dbClient.queryObject(Volume.class,sourceVolumeURI);
      if (sourceVolume != null) {
        StringSet fullCopyIds=sourceVolume.getFullCopies();
        if (fullCopyIds.contains(volumeURI.toString())) {
          fullCopyIds.remove(volumeURI.toString());
          dbClient.updateObject(sourceVolume);
        }
      }
    }
  }
}

public static void cleanUpFullCopyAssociations ( List < VolumeDescriptor > volumeDescriptors , DbClient dbClient ) { List < URI > volumeURIs = VolumeDescriptor . getVolumeURIs ( volumeDescriptors ) ; for ( URI volumeURI : volumeURIs ) { Volume volume = dbClient . queryObject ( Volume . class , volumeURI ) ; URI sourceVolumeURI = volume . getAssociatedSourceVolume ( ) ; if ( ! NullColumnValueGetter . isNullURI ( sourceVolumeURI ) ) { Volume sourceVolume = dbClient . queryObject ( Volume . class , sourceVolumeURI ) ; if ( sourceVolume != null ) { StringSet fullCopyIds = sourceVolume . getFullCopies ( ) ; if ( fullCopyIds . contains ( volumeURI . toString ( ) ) ) { fullCopyIds . remove ( volumeURI . toString ( ) ) ; dbClient . updateObject ( sourceVolume ) ; } } } } }
for vipr - only delete , cleans up the full copy associations between source and full copy volumes .
