private Map<URI,StorageSystem> buildArrayMap(StorageSystem vplexSystem,List<VolumeDescriptor> descriptors,VolumeDescriptor.Type[] types){
  Map<URI,StorageSystem> arrayMap=new HashMap<URI,StorageSystem>();
  if (types != null) {
    descriptors=VolumeDescriptor.filterByType(descriptors,types,new VolumeDescriptor.Type[]{});
  }
  for (  VolumeDescriptor desc : descriptors) {
    if (arrayMap.containsKey(desc.getDeviceURI()) == false) {
      if (vplexSystem == null) {
        StorageSystem array=getDataObject(StorageSystem.class,desc.getDeviceURI(),_dbClient);
        arrayMap.put(desc.getDeviceURI(),array);
      }
 else {
        Set<URI> connectedSystems=ConnectivityUtil.getStorageSystemAssociationsByNetwork(_dbClient,vplexSystem.getId(),StoragePort.PortType.backend);
        if (connectedSystems.contains(desc.getDeviceURI())) {
          StorageSystem array=getDataObject(StorageSystem.class,desc.getDeviceURI(),_dbClient);
          arrayMap.put(desc.getDeviceURI(),array);
        }
      }
    }
  }
  return arrayMap;
}

private Map < URI , StorageSystem > buildArrayMap ( StorageSystem vplexSystem , List < VolumeDescriptor > descriptors , VolumeDescriptor . Type [ ] types ) { Map < URI , StorageSystem > arrayMap = new HashMap < URI , StorageSystem > ( ) ; if ( types != null ) { descriptors = VolumeDescriptor . filterByType ( descriptors , types , new VolumeDescriptor . Type [ ] { } ) ; } for ( VolumeDescriptor desc : descriptors ) { if ( arrayMap . containsKey ( desc . getDeviceURI ( ) ) == false ) { if ( vplexSystem == null ) { StorageSystem array = getDataObject ( StorageSystem . class , desc . getDeviceURI ( ) , _dbClient ) ; arrayMap . put ( desc . getDeviceURI ( ) , array ) ; } else { Set < URI > connectedSystems = ConnectivityUtil . getStorageSystemAssociationsByNetwork ( _dbClient , vplexSystem . getId ( ) , StoragePort . PortType . backend ) ; if ( connectedSystems . contains ( desc . getDeviceURI ( ) ) ) { StorageSystem array = getDataObject ( StorageSystem . class , desc . getDeviceURI ( ) , _dbClient ) ; arrayMap . put ( desc . getDeviceURI ( ) , array ) ; } } } } return arrayMap ; }
build a map of uri to cached storagesystem for the underlying arrays .
