private BusinessObjectFormatEntity createBusinessObjectFormatEntity(BusinessObjectFormatCreateRequest request,BusinessObjectDefinitionEntity businessObjectDefinitionEntity,FileTypeEntity fileTypeEntity,Integer businessObjectFormatVersion){
  BusinessObjectFormatEntity businessObjectFormatEntity=new BusinessObjectFormatEntity();
  businessObjectFormatEntity.setBusinessObjectDefinition(businessObjectDefinitionEntity);
  businessObjectFormatEntity.setUsage(request.getBusinessObjectFormatUsage());
  businessObjectFormatEntity.setFileType(fileTypeEntity);
  businessObjectFormatEntity.setBusinessObjectFormatVersion(businessObjectFormatVersion);
  businessObjectFormatEntity.setLatestVersion(Boolean.TRUE);
  businessObjectFormatEntity.setPartitionKey(request.getPartitionKey());
  businessObjectFormatEntity.setDescription(request.getDescription());
  if (!CollectionUtils.isEmpty(request.getAttributes())) {
    List<BusinessObjectFormatAttributeEntity> attributeEntities=new ArrayList<>();
    businessObjectFormatEntity.setAttributes(attributeEntities);
    for (    Attribute attribute : request.getAttributes()) {
      BusinessObjectFormatAttributeEntity attributeEntity=new BusinessObjectFormatAttributeEntity();
      attributeEntities.add(attributeEntity);
      attributeEntity.setBusinessObjectFormat(businessObjectFormatEntity);
      attributeEntity.setName(attribute.getName());
      attributeEntity.setValue(attribute.getValue());
    }
  }
  businessObjectFormatEntity.setAttributeDefinitions(createAttributeDefinitionEntities(request.getAttributeDefinitions(),businessObjectFormatEntity));
  populateBusinessObjectFormatSchema(businessObjectFormatEntity,request.getSchema());
  return businessObjectFormatDao.saveAndRefresh(businessObjectFormatEntity);
}

private BusinessObjectFormatEntity createBusinessObjectFormatEntity ( BusinessObjectFormatCreateRequest request , BusinessObjectDefinitionEntity businessObjectDefinitionEntity , FileTypeEntity fileTypeEntity , Integer businessObjectFormatVersion ) { BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity ( ) ; businessObjectFormatEntity . setBusinessObjectDefinition ( businessObjectDefinitionEntity ) ; businessObjectFormatEntity . setUsage ( request . getBusinessObjectFormatUsage ( ) ) ; businessObjectFormatEntity . setFileType ( fileTypeEntity ) ; businessObjectFormatEntity . setBusinessObjectFormatVersion ( businessObjectFormatVersion ) ; businessObjectFormatEntity . setLatestVersion ( Boolean . TRUE ) ; businessObjectFormatEntity . setPartitionKey ( request . getPartitionKey ( ) ) ; businessObjectFormatEntity . setDescription ( request . getDescription ( ) ) ; if ( ! CollectionUtils . isEmpty ( request . getAttributes ( ) ) ) { List < BusinessObjectFormatAttributeEntity > attributeEntities = new ArrayList < > ( ) ; businessObjectFormatEntity . setAttributes ( attributeEntities ) ; for ( Attribute attribute : request . getAttributes ( ) ) { BusinessObjectFormatAttributeEntity attributeEntity = new BusinessObjectFormatAttributeEntity ( ) ; attributeEntities . add ( attributeEntity ) ; attributeEntity . setBusinessObjectFormat ( businessObjectFormatEntity ) ; attributeEntity . setName ( attribute . getName ( ) ) ; attributeEntity . setValue ( attribute . getValue ( ) ) ; } } businessObjectFormatEntity . setAttributeDefinitions ( createAttributeDefinitionEntities ( request . getAttributeDefinitions ( ) , businessObjectFormatEntity ) ) ; populateBusinessObjectFormatSchema ( businessObjectFormatEntity , request . getSchema ( ) ) ; return businessObjectFormatDao . saveAndRefresh ( businessObjectFormatEntity ) ; }
creates and persists a new business object format entity from the request information .
