public static void matchModifiedStoragePoolsWithAllVirtualPool(List<StoragePool> updatedPoolList,DbClient dbClient,CoordinatorClient coordinator,StringBuffer errorMessage){
  List<URI> vpoolURIs=dbClient.queryByType(VirtualPool.class,true);
  Iterator<VirtualPool> vpoolListItr=dbClient.queryIterativeObjects(VirtualPool.class,vpoolURIs);
  List<VirtualPool> vPoolsToUpdate=new ArrayList<VirtualPool>();
  while (vpoolListItr.hasNext()) {
    VirtualPool vpool=vpoolListItr.next();
    matchvPoolWithStoragePools(vpool,updatedPoolList,dbClient,coordinator,null,errorMessage);
    vPoolsToUpdate.add(vpool);
  }
  if (!vPoolsToUpdate.isEmpty()) {
    persistUpdatedVpoolList(vPoolsToUpdate,dbClient);
  }
}

public static void matchModifiedStoragePoolsWithAllVirtualPool ( List < StoragePool > updatedPoolList , DbClient dbClient , CoordinatorClient coordinator , StringBuffer errorMessage ) { List < URI > vpoolURIs = dbClient . queryByType ( VirtualPool . class , true ) ; Iterator < VirtualPool > vpoolListItr = dbClient . queryIterativeObjects ( VirtualPool . class , vpoolURIs ) ; List < VirtualPool > vPoolsToUpdate = new ArrayList < VirtualPool > ( ) ; while ( vpoolListItr . hasNext ( ) ) { VirtualPool vpool = vpoolListItr . next ( ) ; matchvPoolWithStoragePools ( vpool , updatedPoolList , dbClient , coordinator , null , errorMessage ) ; vPoolsToUpdate . add ( vpool ) ; } if ( ! vPoolsToUpdate . isEmpty ( ) ) { persistUpdatedVpoolList ( vPoolsToUpdate , dbClient ) ; } }
get all virtualpool from db and invokes matchvpoolwithstoragepools which actually match all pools and all virtualpool in database . this method is invoked if there is any pool to varray association changes . storagepoolassociationhelper . changepoolassociation ( ) = > this is a common method which will be invoked if there any association changes in varray .
