public static void checkExportGroupForCleanup(ExportGroup exportGroup,DbClient dbClient){
  if (exportGroup != null && dbClient != null) {
    if ((exportGroup.checkInternalFlags(Flag.INTERNAL_OBJECT)) && (CollectionUtils.isEmpty(exportGroup.getVolumes()) || CollectionUtils.isEmpty(ExportMaskUtils.getExportMasks(dbClient,exportGroup)))) {
      _log.info(String.format("Marking export group [%s %s] for deletion.",exportGroup.getLabel(),exportGroup.getId()));
      dbClient.markForDeletion(exportGroup);
    }
  }
}

public static void checkExportGroupForCleanup ( ExportGroup exportGroup , DbClient dbClient ) { if ( exportGroup != null && dbClient != null ) { if ( ( exportGroup . checkInternalFlags ( Flag . INTERNAL_OBJECT ) ) && ( CollectionUtils . isEmpty ( exportGroup . getVolumes ( ) ) || CollectionUtils . isEmpty ( ExportMaskUtils . getExportMasks ( dbClient , exportGroup ) ) ) ) { _log . info ( String . format ( "Marking export group [%s %s] for deletion." , exportGroup . getLabel ( ) , exportGroup . getId ( ) ) ) ; dbClient . markForDeletion ( exportGroup ) ; } } }
checks the passed in export group and determines if it requires cleanup . this is mainly used for internal egs ( vplex / rp ) as they might not otherwise be cleaned up .
