Package org.ehrbase.openehr.aqlengine
Class AqlLimitPostProcessor
java.lang.Object
org.ehrbase.openehr.aqlengine.AqlLimitPostProcessor
- All Implemented Interfaces:
AqlQueryParsingPostProcessor,org.springframework.core.Ordered
@Component
public class AqlLimitPostProcessor
extends Object
implements AqlQueryParsingPostProcessor
Applies upper bounds and/or defaults for limit/fetch to an
AqlQuery.-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.ehrbase.openehr.aqlengine.AqlQueryParsingPostProcessor
EHR_PATH_PRECEDENCE, FEATURE_CHECK_PRECEDENCE, FROM_EHR_OPTIMISATION_PRECEDENCE, LIMIT_CONSTRAINT_PRECEDENCE, PARAMETER_REPLACEMENT_PRECEDENCEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionAqlLimitPostProcessor(Long defaultLimit, Long maxLimit, Long maxFetch, AqlLimitPostProcessor.FetchPrecedence fetchPrecedence) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterParseAql(org.ehrbase.openehr.sdk.aql.dto.AqlQuery aqlQuery, AqlQueryRequest request, AqlQueryContext ctx) Invoked after parsing the raw AQL string.intgetOrder()
-
Constructor Details
-
AqlLimitPostProcessor
public AqlLimitPostProcessor(@Value("${ehrbase.rest.aql.default-limit:}") Long defaultLimit, @Value("${ehrbase.rest.aql.max-limit:}") Long maxLimit, @Value("${ehrbase.rest.aql.max-fetch:}") Long maxFetch, @Value("${ehrbase.rest.aql.fetch-precedence:REJECT}") AqlLimitPostProcessor.FetchPrecedence fetchPrecedence)
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
afterParseAql
public void afterParseAql(org.ehrbase.openehr.sdk.aql.dto.AqlQuery aqlQuery, AqlQueryRequest request, AqlQueryContext ctx) Description copied from interface:AqlQueryParsingPostProcessorInvoked after parsing the raw AQL string. The givenAqlQueryobject can be modified in-place. Meta information can be added through theAqlQueryContext.- Specified by:
afterParseAqlin interfaceAqlQueryParsingPostProcessor- Parameters:
aqlQuery- object representing the parsed AQL stringrequest- the request passed to the service layerctx- the query context
-