/** * Creates the file type from the persisted entity. * * @param fileTypeEntity the newly persisted file type entity. * * @return the file type. */ private FileType createFileTypeFromEntity(FileTypeEntity fileTypeEntity) { // Create the file type information. return new FileType(fileTypeEntity.getCode()); } }
/** * Creates the file type from the persisted entity. * * @param fileTypeEntity the newly persisted file type entity. * * @return the file type. */ private FileType createFileTypeFromEntity(FileTypeEntity fileTypeEntity) { // Create the file type information. return new FileType(fileTypeEntity.getCode()); } }
@Test public void testGetFileTypeByCodeInLowerCase() { // Create relative database entities. fileTypeDaoTestHelper.createFileTypeEntity(FORMAT_FILE_TYPE_CODE.toUpperCase(), "Description of " + FORMAT_FILE_TYPE_CODE.toUpperCase()); // Retrieve file type entity. FileTypeEntity fileTypeEntity = fileTypeDao.getFileTypeByCode(FORMAT_FILE_TYPE_CODE.toLowerCase()); // Validate the results. assertNotNull(fileTypeEntity); assertTrue(fileTypeEntity.getCode().equals(FORMAT_FILE_TYPE_CODE.toUpperCase())); assertTrue(fileTypeEntity.getDescription().equals("Description of " + FORMAT_FILE_TYPE_CODE.toUpperCase())); }
@Test public void testGetFileTypeByCodeInUpperCase() { // Create relative database entities. fileTypeDaoTestHelper.createFileTypeEntity(FORMAT_FILE_TYPE_CODE.toLowerCase(), "Description of " + FORMAT_FILE_TYPE_CODE.toLowerCase()); // Retrieve file type entity. FileTypeEntity fileTypeEntity = fileTypeDao.getFileTypeByCode(FORMAT_FILE_TYPE_CODE.toUpperCase()); // Validate the results. assertNotNull(fileTypeEntity); assertTrue(fileTypeEntity.getCode().equals(FORMAT_FILE_TYPE_CODE.toLowerCase())); assertTrue(fileTypeEntity.getDescription().equals("Description of " + FORMAT_FILE_TYPE_CODE.toLowerCase())); }
/** * Returns a string representation of the alternate key values for the business object format. * * @param businessObjectFormatEntity the business object format entity * * @return the string representation of the alternate key values for the business object format entity */ public String businessObjectFormatEntityAltKeyToString(BusinessObjectFormatEntity businessObjectFormatEntity) { return String.format("namespace: \"%s\", businessObjectDefinitionName: \"%s\", businessObjectFormatUsage: \"%s\", " + "businessObjectFormatFileType: \"%s\", businessObjectFormatVersion: %d", businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatEntity.getBusinessObjectDefinition().getName(), businessObjectFormatEntity.getUsage(), businessObjectFormatEntity.getFileType().getCode(), businessObjectFormatEntity.getBusinessObjectFormatVersion()); }
/** * Returns a string representation of the alternate key values for the business object format. * * @param businessObjectFormatEntity the business object format entity * * @return the string representation of the alternate key values for the business object format entity */ public String businessObjectFormatEntityAltKeyToString(BusinessObjectFormatEntity businessObjectFormatEntity) { return String.format("namespace: \"%s\", businessObjectDefinitionName: \"%s\", businessObjectFormatUsage: \"%s\", " + "businessObjectFormatFileType: \"%s\", businessObjectFormatVersion: %d", businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatEntity.getBusinessObjectDefinition().getName(), businessObjectFormatEntity.getUsage(), businessObjectFormatEntity.getFileType().getCode(), businessObjectFormatEntity.getBusinessObjectFormatVersion()); }
@Test public void testGetFileTypeByCode() { // Create relative database entities. fileTypeDaoTestHelper.createFileTypeEntity(FORMAT_FILE_TYPE_CODE, "Description of " + FORMAT_FILE_TYPE_CODE); // Retrieve file type entity. FileTypeEntity fileTypeEntity = fileTypeDao.getFileTypeByCode(FORMAT_FILE_TYPE_CODE); // Validate the results. assertNotNull(fileTypeEntity); assertTrue(fileTypeEntity.getCode().equals(FORMAT_FILE_TYPE_CODE)); assertTrue(fileTypeEntity.getDescription().equals("Description of " + FORMAT_FILE_TYPE_CODE)); }
/** * Returns a string representation of the alternate key values for the business object data entity. * * @param businessObjectDataEntity the business object data entity * * @return the string representation of the alternate key values for the business object data entity */ public String businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectDataEntity.getBusinessObjectFormat(); return businessObjectDataKeyToString(businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatEntity.getBusinessObjectDefinition().getName(), businessObjectFormatEntity.getUsage(), businessObjectFormatEntity.getFileType().getCode(), businessObjectFormatEntity.getBusinessObjectFormatVersion(), businessObjectDataEntity.getPartitionValue(), getSubPartitionValues(businessObjectDataEntity), businessObjectDataEntity.getVersion()); }
/** * Returns a string representation of the alternate key values for the business object data entity. * * @param businessObjectDataEntity the business object data entity * * @return the string representation of the alternate key values for the business object data entity */ public String businessObjectDataEntityAltKeyToString(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectDataEntity.getBusinessObjectFormat(); return businessObjectDataKeyToString(businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatEntity.getBusinessObjectDefinition().getName(), businessObjectFormatEntity.getUsage(), businessObjectFormatEntity.getFileType().getCode(), businessObjectFormatEntity.getBusinessObjectFormatVersion(), businessObjectDataEntity.getPartitionValue(), getSubPartitionValues(businessObjectDataEntity), businessObjectDataEntity.getVersion()); }
/** * Creates a business object format key from specified business object format entity. * * @param businessObjectFormatEntity the business object format entity * * @return the business object format key */ public BusinessObjectFormatKey getBusinessObjectFormatKey(BusinessObjectFormatEntity businessObjectFormatEntity) { BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(); businessObjectFormatKey.setNamespace(businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode()); businessObjectFormatKey.setBusinessObjectDefinitionName(businessObjectFormatEntity.getBusinessObjectDefinition().getName()); businessObjectFormatKey.setBusinessObjectFormatUsage(businessObjectFormatEntity.getUsage()); businessObjectFormatKey.setBusinessObjectFormatFileType(businessObjectFormatEntity.getFileType().getCode()); businessObjectFormatKey.setBusinessObjectFormatVersion(businessObjectFormatEntity.getBusinessObjectFormatVersion()); return businessObjectFormatKey; }
/** * Creates a business object format to external interface mapping key from the specified entity. * * @param businessObjectFormatExternalInterfaceEntity the business object format to external interface entity * * @return the business object format to external interface mapping key */ public BusinessObjectFormatExternalInterfaceKey createBusinessObjectFormatExternalInterfaceKeyFromEntity( BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity) { return new BusinessObjectFormatExternalInterfaceKey( businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getUsage(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getFileType().getCode(), businessObjectFormatExternalInterfaceEntity.getExternalInterface().getCode()); }
/** * Creates a business object format key from specified business object format entity. * * @param businessObjectFormatEntity the business object format entity * * @return the business object format key */ public BusinessObjectFormatKey getBusinessObjectFormatKey(BusinessObjectFormatEntity businessObjectFormatEntity) { BusinessObjectFormatKey businessObjectFormatKey = new BusinessObjectFormatKey(); businessObjectFormatKey.setNamespace(businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode()); businessObjectFormatKey.setBusinessObjectDefinitionName(businessObjectFormatEntity.getBusinessObjectDefinition().getName()); businessObjectFormatKey.setBusinessObjectFormatUsage(businessObjectFormatEntity.getUsage()); businessObjectFormatKey.setBusinessObjectFormatFileType(businessObjectFormatEntity.getFileType().getCode()); businessObjectFormatKey.setBusinessObjectFormatVersion(businessObjectFormatEntity.getBusinessObjectFormatVersion()); return businessObjectFormatKey; }
/** * Creates a business object format to external interface mapping key from the specified entity. * * @param businessObjectFormatExternalInterfaceEntity the business object format to external interface entity * * @return the business object format to external interface mapping key */ public BusinessObjectFormatExternalInterfaceKey createBusinessObjectFormatExternalInterfaceKeyFromEntity( BusinessObjectFormatExternalInterfaceEntity businessObjectFormatExternalInterfaceEntity) { return new BusinessObjectFormatExternalInterfaceKey( businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getUsage(), businessObjectFormatExternalInterfaceEntity.getBusinessObjectFormat().getFileType().getCode(), businessObjectFormatExternalInterfaceEntity.getExternalInterface().getCode()); }
/** * Creates the custom DDL from the persisted entity. * * @param customDdlEntity the custom DDL entity * * @return the custom DDL */ private CustomDdl createCustomDdlFromEntity(CustomDdlEntity customDdlEntity) { // Create the custom DDL. CustomDdl customDdl = new CustomDdl(); customDdl.setId(customDdlEntity.getId()); customDdl.setCustomDdlKey(new CustomDdlKey(customDdlEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), customDdlEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName(), customDdlEntity.getBusinessObjectFormat().getUsage(), customDdlEntity.getBusinessObjectFormat().getFileType().getCode(), customDdlEntity.getBusinessObjectFormat().getBusinessObjectFormatVersion(), customDdlEntity.getCustomDdlName())); customDdl.setDdl(customDdlEntity.getDdl()); return customDdl; } }
/** * Creates the custom DDL from the persisted entity. * * @param customDdlEntity the custom DDL entity * * @return the custom DDL */ private CustomDdl createCustomDdlFromEntity(CustomDdlEntity customDdlEntity) { // Create the custom DDL. CustomDdl customDdl = new CustomDdl(); customDdl.setId(customDdlEntity.getId()); customDdl.setCustomDdlKey(new CustomDdlKey(customDdlEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), customDdlEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName(), customDdlEntity.getBusinessObjectFormat().getUsage(), customDdlEntity.getBusinessObjectFormat().getFileType().getCode(), customDdlEntity.getBusinessObjectFormat().getBusinessObjectFormatVersion(), customDdlEntity.getCustomDdlName())); customDdl.setDdl(customDdlEntity.getDdl()); return customDdl; } }
/** * Returns a business object data key for the business object data entity. * * @param businessObjectDataEntity the business object data entity * * @return the business object data key for the business object data entity */ public BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(); BusinessObjectFormatEntity businessObjectFormatEntity = businessObjectDataEntity.getBusinessObjectFormat(); businessObjectDataKey.setNamespace(businessObjectFormatEntity.getBusinessObjectDefinition().getNamespace().getCode()); businessObjectDataKey.setBusinessObjectDefinitionName(businessObjectFormatEntity.getBusinessObjectDefinition().getName()); businessObjectDataKey.setBusinessObjectFormatUsage(businessObjectFormatEntity.getUsage()); businessObjectDataKey.setBusinessObjectFormatFileType(businessObjectFormatEntity.getFileType().getCode()); businessObjectDataKey.setBusinessObjectFormatVersion(businessObjectFormatEntity.getBusinessObjectFormatVersion()); businessObjectDataKey.setPartitionValue(businessObjectDataEntity.getPartitionValue()); businessObjectDataKey.setSubPartitionValues(getSubPartitionValues(businessObjectDataEntity)); businessObjectDataKey.setBusinessObjectDataVersion(businessObjectDataEntity.getVersion()); return businessObjectDataKey; }
/** * Creates a business object data key from a business object data entity. * * @param businessObjectDataEntity the business object data entity. * * @return the business object data key. */ public BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(); businessObjectDataKey.setNamespace(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode()); businessObjectDataKey.setBusinessObjectDefinitionName(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName()); businessObjectDataKey.setBusinessObjectFormatUsage(businessObjectDataEntity.getBusinessObjectFormat().getUsage()); businessObjectDataKey.setBusinessObjectFormatFileType(businessObjectDataEntity.getBusinessObjectFormat().getFileType().getCode()); businessObjectDataKey.setBusinessObjectFormatVersion(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectFormatVersion()); businessObjectDataKey.setPartitionValue(businessObjectDataEntity.getPartitionValue()); businessObjectDataKey.setSubPartitionValues(getSubPartitionValues(businessObjectDataEntity)); businessObjectDataKey.setBusinessObjectDataVersion(businessObjectDataEntity.getVersion()); return businessObjectDataKey; }
/** * Creates a business object data key from a business object data entity. * * @param businessObjectDataEntity the business object data entity. * * @return the business object data key. */ public BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(); businessObjectDataKey.setNamespace(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode()); businessObjectDataKey.setBusinessObjectDefinitionName(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName()); businessObjectDataKey.setBusinessObjectFormatUsage(businessObjectDataEntity.getBusinessObjectFormat().getUsage()); businessObjectDataKey.setBusinessObjectFormatFileType(businessObjectDataEntity.getBusinessObjectFormat().getFileType().getCode()); businessObjectDataKey.setBusinessObjectFormatVersion(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectFormatVersion()); businessObjectDataKey.setPartitionValue(businessObjectDataEntity.getPartitionValue()); businessObjectDataKey.setSubPartitionValues(getSubPartitionValues(businessObjectDataEntity)); businessObjectDataKey.setBusinessObjectDataVersion(businessObjectDataEntity.getVersion()); return businessObjectDataKey; }
/** * Creates and returns a business object data attribute key from a specified business object data attribute entity. * * @param businessObjectDataAttributeEntity the business object data attribute entity * * @return the newly created business object data attribute key */ private BusinessObjectDataAttributeKey getBusinessObjectDataAttributeKey(BusinessObjectDataAttributeEntity businessObjectDataAttributeEntity) { return new BusinessObjectDataAttributeKey( businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectDefinition().getName(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getUsage(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getFileType().getCode(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectFormatVersion(), businessObjectDataAttributeEntity.getBusinessObjectData().getPartitionValue(), businessObjectDataHelper.getSubPartitionValues(businessObjectDataAttributeEntity.getBusinessObjectData()), businessObjectDataAttributeEntity.getBusinessObjectData().getVersion(), businessObjectDataAttributeEntity.getName()); } }
/** * Creates and returns a business object data attribute key from a specified business object data attribute entity. * * @param businessObjectDataAttributeEntity the business object data attribute entity * * @return the newly created business object data attribute key */ private BusinessObjectDataAttributeKey getBusinessObjectDataAttributeKey(BusinessObjectDataAttributeEntity businessObjectDataAttributeEntity) { return new BusinessObjectDataAttributeKey( businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectDefinition().getName(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getUsage(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getFileType().getCode(), businessObjectDataAttributeEntity.getBusinessObjectData().getBusinessObjectFormat().getBusinessObjectFormatVersion(), businessObjectDataAttributeEntity.getBusinessObjectData().getPartitionValue(), businessObjectDataHelper.getSubPartitionValues(businessObjectDataAttributeEntity.getBusinessObjectData()), businessObjectDataAttributeEntity.getBusinessObjectData().getVersion(), businessObjectDataAttributeEntity.getName()); } }