Interface EntityQueryConditionTranslator

All Known Implementing Classes:
ContainsEntityQueryConditionTranslator, EmptyStringEntityQueryConditionTranslator, ExpandingEntityQueryConditionTranslator, IgnoringCaseEntityQueryConditionTranslator, InEntityQueryConditionTranslator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EntityQueryConditionTranslator
API for converting or optimizing a single EntityQueryCondition. If registered on a EntityPropertyDescriptor any condition for that property will be pre-processed by the translator. Condition translation is performed by the EntityQueryTranslator during pre-processing of a query.
Since:
2.1.0
Author:
Arne Vandamme
See Also:
  • Method Details

    • translate

    • ignoreCase

      static EntityQueryConditionTranslator ignoreCase()
      Creates a translator that ensures a condition is always applied case insensitive. Note that if you always want a property to be queried case insensitive, it is probably better to set a collation in the backing datastore as that offers better performance.
      Returns:
      translator that will ensure a condition is always applied case insensitive
    • expandingOr

      static EntityQueryConditionTranslator expandingOr(String... propertyNames)
      Creates a translator that replaces a single condition by an OR combination of multiple other conditions, having the same operand and argument values. If the original operand is a negation, the expansion will happen with an AND operand instead.
      Parameters:
      propertyNames - to combine
      Returns:
      translator for the property names
    • expandingAnd

      static EntityQueryConditionTranslator expandingAnd(String... propertyNames)
      Creates a translator that replaces a single condition by an AND combination of multiple other conditions, having the same operand and argument values. If the original operand is a negation, the expansion will happen with an OR operand instead.
      Parameters:
      propertyNames - to combine
      Returns:
      translator for the property names