Interface SearchCriterionDefinition

    • Method Detail

      • getId

        String getId()
        Gets the id of the criterion. It must be unique across all criterion definitions
        Returns:
        the unique id of the criterion
      • getContextPrefixLabels

        default List<I18nizableTextgetContextPrefixLabels()
        Gets the prefix labels, sometimes useful (such as for displaying all criterion definitions) for grouping information.
        Returns:
        The prefix labels (can be empty)
      • isEnumerated

        boolean isEnumerated()
        Returns true if this criterion definition is enumerated
        Returns:
        true if this criterion definition is enumerated
      • isTooBigForStaticEnumerator

        boolean isTooBigForStaticEnumerator()
        Returns true if this criterion definition is enumerated but can contains too much data
        Returns:
        true if this criterion definition is enumerated but can contains too much data
      • toJSON

        Map<String,​ObjecttoJSON()
                                 throws Exception
        Gets the JSON representation of this criterion definition
        Returns:
        the JSON representation of this criterion definition
        Throws:
        Exception - if an exception occurs
      • getQuery

        Query getQuery​(Object value,
                       Query.Operator operator,
                       String language,
                       Map<String,​Object> contextualParameters)
        Gets the query associated to the given value
        Parameters:
        value - the value
        operator - the operator
        language - The current search language.
        contextualParameters - the search contextual parameters.
        Returns:
        the query associated to the given value
      • getEmptyValueQuery

        Query getEmptyValueQuery​(String language,
                                 Map<String,​Object> contextualParameters)
        Gets the query for testing the value is empty
        Parameters:
        language - The current search language.
        contextualParameters - the search contextual parameters.
        Returns:
        the query for testing the value is empty