private StoragePolicyEntity createStoragePolicyEntity(NamespaceEntity namespaceEntity,String storagePolicyName,StorageEntity storageEntity,StorageEntity destinationStorageEntity,StoragePolicyRuleTypeEntity storagePolicyRuleTypeEntity,Integer storagePolicyRuleValue,BusinessObjectDefinitionEntity businessObjectDefinitionEntity,String businessObjectFormatUsage,FileTypeEntity fileTypeEntity,StoragePolicyStatusEntity storagePolicyStatusEntity,Integer storagePolicyVersion,Boolean storagePolicyLatestVersion){
  StoragePolicyEntity storagePolicyEntity=new StoragePolicyEntity();
  storagePolicyEntity.setNamespace(namespaceEntity);
  storagePolicyEntity.setName(storagePolicyName);
  storagePolicyEntity.setStorage(storageEntity);
  storagePolicyEntity.setDestinationStorage(destinationStorageEntity);
  storagePolicyEntity.setStoragePolicyRuleType(storagePolicyRuleTypeEntity);
  storagePolicyEntity.setStoragePolicyRuleValue(storagePolicyRuleValue);
  storagePolicyEntity.setBusinessObjectDefinition(businessObjectDefinitionEntity);
  if (StringUtils.isNotBlank(businessObjectFormatUsage)) {
    storagePolicyEntity.setUsage(businessObjectFormatUsage);
  }
  storagePolicyEntity.setFileType(fileTypeEntity);
  storagePolicyEntity.setStatus(storagePolicyStatusEntity);
  storagePolicyEntity.setVersion(storagePolicyVersion);
  storagePolicyEntity.setLatestVersion(storagePolicyLatestVersion);
  return storagePolicyDao.saveAndRefresh(storagePolicyEntity);
}

private StoragePolicyEntity createStoragePolicyEntity ( NamespaceEntity namespaceEntity , String storagePolicyName , StorageEntity storageEntity , StorageEntity destinationStorageEntity , StoragePolicyRuleTypeEntity storagePolicyRuleTypeEntity , Integer storagePolicyRuleValue , BusinessObjectDefinitionEntity businessObjectDefinitionEntity , String businessObjectFormatUsage , FileTypeEntity fileTypeEntity , StoragePolicyStatusEntity storagePolicyStatusEntity , Integer storagePolicyVersion , Boolean storagePolicyLatestVersion ) { StoragePolicyEntity storagePolicyEntity = new StoragePolicyEntity ( ) ; storagePolicyEntity . setNamespace ( namespaceEntity ) ; storagePolicyEntity . setName ( storagePolicyName ) ; storagePolicyEntity . setStorage ( storageEntity ) ; storagePolicyEntity . setDestinationStorage ( destinationStorageEntity ) ; storagePolicyEntity . setStoragePolicyRuleType ( storagePolicyRuleTypeEntity ) ; storagePolicyEntity . setStoragePolicyRuleValue ( storagePolicyRuleValue ) ; storagePolicyEntity . setBusinessObjectDefinition ( businessObjectDefinitionEntity ) ; if ( StringUtils . isNotBlank ( businessObjectFormatUsage ) ) { storagePolicyEntity . setUsage ( businessObjectFormatUsage ) ; } storagePolicyEntity . setFileType ( fileTypeEntity ) ; storagePolicyEntity . setStatus ( storagePolicyStatusEntity ) ; storagePolicyEntity . setVersion ( storagePolicyVersion ) ; storagePolicyEntity . setLatestVersion ( storagePolicyLatestVersion ) ; return storagePolicyDao . saveAndRefresh ( storagePolicyEntity ) ; }
creates and persists a new storage policy entity .
