private void createStorageAdapter(StorageHADomain adapter,CIMInstance adapterInstance,AccessProfile profile) throws URISyntaxException, IOException {
  if (null == adapter) {
    adapter=new StorageHADomain();
    adapter.setId(URIUtil.createId(StorageHADomain.class));
    adapter.setStorageDeviceURI(profile.getSystemId());
    adapter.setName(getCIMPropertyValue(adapterInstance,NAME));
    adapter.setAdapterName(getCIMPropertyValue(adapterInstance,EMCADAPTERNAME));
    adapter.setNativeGuid(NativeGUIDGenerator.generateNativeGuid(_dbClient,adapter));
  }
  adapter.setNumberofPorts(getCIMPropertyValue(adapterInstance,EMCNUMPORTS));
  adapter.setProtocol(getCIMPropertyValue(adapterInstance,EMCPROTOCOL));
  adapter.setSlotNumber(getCIMPropertyValue(adapterInstance,EMCSLOTNUMBER));
  String[] roles=(String[])adapterInstance.getPropertyValue(ROLES);
  adapter.setAdapterType(HADomainType.getHADomainTypeName(roles[0]));
  _storageAdapterList.add(adapter);
}

private void createStorageAdapter ( StorageHADomain adapter , CIMInstance adapterInstance , AccessProfile profile ) throws URISyntaxException , IOException { if ( null == adapter ) { adapter = new StorageHADomain ( ) ; adapter . setId ( URIUtil . createId ( StorageHADomain . class ) ) ; adapter . setStorageDeviceURI ( profile . getSystemId ( ) ) ; adapter . setName ( getCIMPropertyValue ( adapterInstance , NAME ) ) ; adapter . setAdapterName ( getCIMPropertyValue ( adapterInstance , EMCADAPTERNAME ) ) ; adapter . setNativeGuid ( NativeGUIDGenerator . generateNativeGuid ( _dbClient , adapter ) ) ; } adapter . setNumberofPorts ( getCIMPropertyValue ( adapterInstance , EMCNUMPORTS ) ) ; adapter . setProtocol ( getCIMPropertyValue ( adapterInstance , EMCPROTOCOL ) ) ; adapter . setSlotNumber ( getCIMPropertyValue ( adapterInstance , EMCSLOTNUMBER ) ) ; String [ ] roles = ( String [ ] ) adapterInstance . getPropertyValue ( ROLES ) ; adapter . setAdapterType ( HADomainType . getHADomainTypeName ( roles [ 0 ] ) ) ; _storageAdapterList . add ( adapter ) ; }
create storageadapter record , if not present already , else update only the properties .
