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.
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 Summary
Modifier and TypeMethodDescriptionexpandingAnd
(String... propertyNames) Creates a translator that replaces a single condition by anAND
combination of multiple other conditions, having the same operand and argument values.expandingOr
(String... propertyNames) Creates a translator that replaces a single condition by anOR
combination of multiple other conditions, having the same operand and argument values.Creates a translator that ensures a condition is always applied case insensitive.translate
(EntityQueryCondition condition)
-
Method Details
-
translate
-
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
Creates a translator that replaces a single condition by anOR
combination of multiple other conditions, having the same operand and argument values. If the original operand is a negation, the expansion will happen with anAND
operand instead.- Parameters:
propertyNames
- to combine- Returns:
- translator for the property names
-
expandingAnd
Creates a translator that replaces a single condition by anAND
combination of multiple other conditions, having the same operand and argument values. If the original operand is a negation, the expansion will happen with anOR
operand instead.- Parameters:
propertyNames
- to combine- Returns:
- translator for the property names
-