public static List<URI> fetchCgIds(DbClient dbClient,List<URI> volURIs){
  List<URI> cgIds=new ArrayList<>();
  if (volURIs != null) {
    for (    URI volumeId : volURIs) {
      Volume volume=dbClient.queryObject(Volume.class,volumeId);
      if (volume != null && volume.getConsistencyGroup() != null && !cgIds.contains(volume.getConsistencyGroup())) {
        cgIds.add(volume.getConsistencyGroup());
      }
    }
  }
  return cgIds;
}

public static List < URI > fetchCgIds ( DbClient dbClient , List < URI > volURIs ) { List < URI > cgIds = new ArrayList < > ( ) ; if ( volURIs != null ) { for ( URI volumeId : volURIs ) { Volume volume = dbClient . queryObject ( Volume . class , volumeId ) ; if ( volume != null && volume . getConsistencyGroup ( ) != null && ! cgIds . contains ( volume . getConsistencyGroup ( ) ) ) { cgIds . add ( volume . getConsistencyGroup ( ) ) ; } } } return cgIds ; }
convenience method to retrieve all of the cgs associated with the volume ids
