Class AqlParameterPostProcessor

java.lang.Object
org.ehrbase.openehr.aqlengine.AqlParameterPostProcessor
All Implemented Interfaces:
AqlQueryParsingPostProcessor, org.springframework.core.Ordered

@Component public class AqlParameterPostProcessor extends Object implements AqlQueryParsingPostProcessor
Replaces parameters in an AQL query
  • Constructor Details

    • AqlParameterPostProcessor

      public AqlParameterPostProcessor()
  • Method Details

    • afterParseAql

      public void afterParseAql(org.ehrbase.openehr.sdk.aql.dto.AqlQuery aqlQuery, AqlQueryRequest request, AqlQueryContext ctx)
      Description copied from interface: AqlQueryParsingPostProcessor
      Invoked after parsing the raw AQL string. The given AqlQuery object can be modified in-place. Meta information can be added through the AqlQueryContext.
      Specified by:
      afterParseAql in interface AqlQueryParsingPostProcessor
      Parameters:
      aqlQuery - object representing the parsed AQL string
      request - the request passed to the service layer
      ctx - the query context
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • replaceParameters

      public static void replaceParameters(org.ehrbase.openehr.sdk.aql.dto.AqlQuery aqlQuery, Map<String,Object> parameterMap)
      Replaces all parameters in the aqlQuery with values from the parameterMap. The replacement is performed in-place, modifying the source object. Missing parameter values are set to NULL.
      Parameters:
      aqlQuery - the query to me modified
      parameterMap - a map of parameter values
    • replaceIdentifiedPathParameters

      public static void replaceIdentifiedPathParameters(org.ehrbase.openehr.sdk.aql.dto.operand.IdentifiedPath identifiedPath, Map<String,Object> parameterMap)