Class DefaultEntityQueryTranslator
java.lang.Object
com.foreach.across.modules.entity.query.DefaultEntityQueryTranslator
- All Implemented Interfaces:
EntityQueryTranslator
Default implementation of
EntityQueryTranslator
that uses the metadata from a EntityPropertyRegistry
to retrieve the property type information and an EQTypeConverter
to convert raw arguments into typed values.
If a EntityPropertyDescriptor
has an EntityQueryConditionTranslator
attribute, the processed
EntityQueryCondition
will be run through that translator as well.
Note that as of 2.2.0
translation happens recursively on sub queries returned: if a condition translation results in a sub query,
the individual conditions of that sub query will also be translated.- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setPropertyRegistry
(EntityPropertyRegistry propertyRegistry) void
setTypeConverter
(EQTypeConverter typeConverter) translate
(EntityQuery rawQuery) Translate the raw query into strongly typed version.void
-
Constructor Details
-
DefaultEntityQueryTranslator
public DefaultEntityQueryTranslator()
-
-
Method Details
-
setPropertyRegistry
-
setTypeConverter
-
validateProperties
@PostConstruct public void validateProperties() -
translate
Translate the raw query into strongly typed version. If a query is marked asEntityQueryExpression.isTranslated()
}, then the expression will not be re-translated.- Specified by:
translate
in interfaceEntityQueryTranslator
- Parameters:
rawQuery
- instance- Returns:
- translated query
-