Search in sources :

Example 6 with BusinessObjectDataKeys

use of org.finra.herd.model.api.xml.BusinessObjectDataKeys in project herd by FINRAOS.

the class BusinessObjectDataServiceImpl method getAllBusinessObjectDataByBusinessObjectDefinition.

@NamespacePermission(fields = "#businessObjectDefinitionKey.namespace", permissions = NamespacePermissionEnum.READ)
@Override
public BusinessObjectDataKeys getAllBusinessObjectDataByBusinessObjectDefinition(BusinessObjectDefinitionKey businessObjectDefinitionKey) {
    // Perform validation and trim.
    businessObjectDefinitionHelper.validateBusinessObjectDefinitionKey(businessObjectDefinitionKey);
    // Ensure that a business object definition already exists with the specified name.
    BusinessObjectDefinitionEntity businessObjectDefinitionEntity = businessObjectDefinitionDaoHelper.getBusinessObjectDefinitionEntity(businessObjectDefinitionKey);
    // Get the maximum number of records to return.
    Integer maxResults = configurationHelper.getProperty(ConfigurationValue.BUSINESS_OBJECT_DATA_SEARCH_MAX_RESULTS, Integer.class);
    // Gets the list of keys and return them.
    BusinessObjectDataKeys businessObjectDataKeys = new BusinessObjectDataKeys();
    businessObjectDataKeys.getBusinessObjectDataKeys().addAll(businessObjectDataDao.getBusinessObjectDataByBusinessObjectDefinition(businessObjectDefinitionEntity, maxResults));
    return businessObjectDataKeys;
}
Also used : BusinessObjectDefinitionEntity(org.finra.herd.model.jpa.BusinessObjectDefinitionEntity) BusinessObjectDataKeys(org.finra.herd.model.api.xml.BusinessObjectDataKeys) NamespacePermission(org.finra.herd.model.annotation.NamespacePermission)

Aggregations

BusinessObjectDataKeys (org.finra.herd.model.api.xml.BusinessObjectDataKeys)6 BusinessObjectDataKey (org.finra.herd.model.api.xml.BusinessObjectDataKey)4 Test (org.junit.Test)4 NamespacePermission (org.finra.herd.model.annotation.NamespacePermission)2 BusinessObjectDefinitionKey (org.finra.herd.model.api.xml.BusinessObjectDefinitionKey)2 BusinessObjectFormatKey (org.finra.herd.model.api.xml.BusinessObjectFormatKey)2 BusinessObjectDefinitionEntity (org.finra.herd.model.jpa.BusinessObjectDefinitionEntity)2 BusinessObjectFormatEntity (org.finra.herd.model.jpa.BusinessObjectFormatEntity)2