Search in sources :

Example 26 with PartitionValueRange

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

the class ExpectedPartitionValueRestController method getExpectedPartitionValues.

/**
 * Retrieves a range of existing expected partition values.
 *
 * @param partitionKeyGroupName the partition key group name
 * @param startExpectedPartitionValue the start expected partition value for the expected partition value range
 * @param endExpectedPartitionValue the end expected partition value for the expected partition value range
 *
 * @return the expected partition values
 */
@RequestMapping(value = EXPECTED_PARTITION_VALUES_URI_PREFIX + "/partitionKeyGroups/{partitionKeyGroupName}", method = RequestMethod.GET)
@Secured(SecurityFunctions.FN_EXPECTED_PARTITION_VALUES_GET)
public ExpectedPartitionValuesInformation getExpectedPartitionValues(@PathVariable("partitionKeyGroupName") String partitionKeyGroupName, @RequestParam(value = "startExpectedPartitionValue", required = false) String startExpectedPartitionValue, @RequestParam(value = "endExpectedPartitionValue", required = false) String endExpectedPartitionValue) {
    PartitionKeyGroupKey partitionKeyGroupKey = new PartitionKeyGroupKey();
    partitionKeyGroupKey.setPartitionKeyGroupName(partitionKeyGroupName);
    PartitionValueRange partitionValueRange = new PartitionValueRange();
    partitionValueRange.setStartPartitionValue(startExpectedPartitionValue);
    partitionValueRange.setEndPartitionValue(endExpectedPartitionValue);
    return expectedPartitionValueService.getExpectedPartitionValues(partitionKeyGroupKey, partitionValueRange);
}
Also used : PartitionValueRange(org.finra.herd.model.api.xml.PartitionValueRange) PartitionKeyGroupKey(org.finra.herd.model.api.xml.PartitionKeyGroupKey) Secured(org.springframework.security.access.annotation.Secured) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

PartitionValueRange (org.finra.herd.model.api.xml.PartitionValueRange)26 Test (org.junit.Test)19 PartitionKeyGroupKey (org.finra.herd.model.api.xml.PartitionKeyGroupKey)12 PartitionValueFilter (org.finra.herd.model.api.xml.PartitionValueFilter)12 ArrayList (java.util.ArrayList)8 ExpectedPartitionValuesInformation (org.finra.herd.model.api.xml.ExpectedPartitionValuesInformation)8 PartitionKeyGroupEntity (org.finra.herd.model.jpa.PartitionKeyGroupEntity)6 BusinessObjectData (org.finra.herd.model.api.xml.BusinessObjectData)4 BusinessObjectDataSearchKey (org.finra.herd.model.api.xml.BusinessObjectDataSearchKey)4 BusinessObjectDataEntity (org.finra.herd.model.jpa.BusinessObjectDataEntity)4 BusinessObjectDataAvailabilityRequest (org.finra.herd.model.api.xml.BusinessObjectDataAvailabilityRequest)3 BusinessObjectDataDdlRequest (org.finra.herd.model.api.xml.BusinessObjectDataDdlRequest)2 ExpectedPartitionValueEntity (org.finra.herd.model.jpa.ExpectedPartitionValueEntity)2 Predicate (javax.persistence.criteria.Predicate)1 ObjectNotFoundException (org.finra.herd.model.ObjectNotFoundException)1 AttributeValueFilter (org.finra.herd.model.api.xml.AttributeValueFilter)1 BusinessObjectDataAvailability (org.finra.herd.model.api.xml.BusinessObjectDataAvailability)1 ExpectedPartitionValueInformation (org.finra.herd.model.api.xml.ExpectedPartitionValueInformation)1 ExpectedPartitionValueKey (org.finra.herd.model.api.xml.ExpectedPartitionValueKey)1 ExpectedPartitionValuesCreateRequest (org.finra.herd.model.api.xml.ExpectedPartitionValuesCreateRequest)1