Class EntityQueryParserFactory
java.lang.Object
com.foreach.across.modules.entity.query.EntityQueryParserFactory
Central component for creating
EntityQueryParser
instances and related components.- Since:
- 3.1.0
- Author:
- Arne Vandamme
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateMetadataProvider
(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryMetadataProvider
that uses the specifiedEntityPropertyRegistry
to determine the valid property, operand and argument combinations.Create a newEntityQueryParser
instance without any default configuration.createParser
(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryParser
prepared for theEntityPropertyRegistry
specified.createTranslator
(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryTranslator
that translates the properties of a rawEntityQuery
based on the information in theEntityPropertyRegistry
and turns it into an executable query that can be passed to the correspondingEntityQueryExecutor
.
-
Constructor Details
-
EntityQueryParserFactory
-
-
Method Details
-
createParser
Create a newEntityQueryParser
prepared for theEntityPropertyRegistry
specified. This returns a pre-configured and usable instance that can convert EQL statements for entities represented by the property registry into executableEntityQuery
instances.- Parameters:
propertyRegistry
- to configure the parser for- Returns:
- parser instance
-
createParser
Create a newEntityQueryParser
instance without any default configuration. The returned instance will not be usable until both aEntityQueryTranslator
and aEntityQueryMetadataProvider
have been assigned.- Returns:
- parser instance
-
createMetadataProvider
public DefaultEntityQueryMetadataProvider createMetadataProvider(@NonNull @NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryMetadataProvider
that uses the specifiedEntityPropertyRegistry
to determine the valid property, operand and argument combinations.- Parameters:
propertyRegistry
- to build the metadata provider on- Returns:
- metadata provider instance
-
createTranslator
public DefaultEntityQueryTranslator createTranslator(@NonNull @NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryTranslator
that translates the properties of a rawEntityQuery
based on the information in theEntityPropertyRegistry
and turns it into an executable query that can be passed to the correspondingEntityQueryExecutor
.- Parameters:
propertyRegistry
- to build the translator on- Returns:
- translator instance
-