Class OperatorUtil


  • public class OperatorUtil
    extends Object
    Helper functions to obtain Operator values from QueryParameter objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.ibm.fhir.database.utils.query.Operator convert​(String op)
      Convert the operator string value to its enum equivalent
      static com.ibm.fhir.database.utils.query.Operator getOperator​(com.ibm.fhir.search.parameters.QueryParameter queryParameter)
      Get the operator we need to use for matching values for this parameter
      static com.ibm.fhir.database.utils.query.Operator getOperator​(com.ibm.fhir.search.parameters.QueryParameter queryParm, String defaultOverride)
      Map the Modifier in the passed Parameter to a supported query operator.
    • Method Detail

      • getOperator

        public static com.ibm.fhir.database.utils.query.Operator getOperator​(com.ibm.fhir.search.parameters.QueryParameter queryParameter)
        Get the operator we need to use for matching values for this parameter
        Returns:
      • convert

        public static com.ibm.fhir.database.utils.query.Operator convert​(String op)
        Convert the operator string value to its enum equivalent
        Parameters:
        op -
        Returns:
      • getOperator

        public static com.ibm.fhir.database.utils.query.Operator getOperator​(com.ibm.fhir.search.parameters.QueryParameter queryParm,
                                                                             String defaultOverride)
        Map the Modifier in the passed Parameter to a supported query operator. If the mapping results in the default operator, override the default operator with the passed operator if the passed operator is not null.
        Parameters:
        queryParm - - A valid query Parameter.
        defaultOverride - - An operator that should override the default operator.
        Returns:
        A supported operator.