protected StorageHADomain checkAdapterExistsInDB(String nativeGuid) throws IOException {
  StorageHADomain adapter=null;
  List<StorageHADomain> adapterInDB=CustomQueryUtility.getActiveStorageHADomainByNativeGuid(_dbClient,nativeGuid);
  if (adapterInDB != null && !adapterInDB.isEmpty()) {
    adapter=adapterInDB.get(0);
  }
  return adapter;
}

protected StorageHADomain checkAdapterExistsInDB ( String nativeGuid ) throws IOException { StorageHADomain adapter = null ; List < StorageHADomain > adapterInDB = CustomQueryUtility . getActiveStorageHADomainByNativeGuid ( _dbClient , nativeGuid ) ; if ( adapterInDB != null && ! adapterInDB . isEmpty ( ) ) { adapter = adapterInDB . get ( 0 ) ; } return adapter ; }
check if adapter exists in db .
