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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMetadataProvider(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryMetadataProviderthat uses the specifiedEntityPropertyRegistryto determine the valid property, operand and argument combinations.Create a newEntityQueryParserinstance without any default configuration.createParser(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryParserprepared for theEntityPropertyRegistryspecified.createTranslator(@NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryTranslatorthat translates the properties of a rawEntityQuerybased on the information in theEntityPropertyRegistryand turns it into an executable query that can be passed to the correspondingEntityQueryExecutor.
-
Constructor Details
-
EntityQueryParserFactory
-
-
Method Details
-
createParser
Create a newEntityQueryParserprepared for theEntityPropertyRegistryspecified. This returns a pre-configured and usable instance that can convert EQL statements for entities represented by the property registry into executableEntityQueryinstances.- Parameters:
propertyRegistry- to configure the parser for- Returns:
- parser instance
-
createParser
Create a newEntityQueryParserinstance without any default configuration. The returned instance will not be usable until both aEntityQueryTranslatorand aEntityQueryMetadataProviderhave been assigned.- Returns:
- parser instance
-
createMetadataProvider
public DefaultEntityQueryMetadataProvider createMetadataProvider(@NonNull @NonNull EntityPropertyRegistry propertyRegistry) Create a newEntityQueryMetadataProviderthat uses the specifiedEntityPropertyRegistryto 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 newEntityQueryTranslatorthat translates the properties of a rawEntityQuerybased on the information in theEntityPropertyRegistryand turns it into an executable query that can be passed to the correspondingEntityQueryExecutor.- Parameters:
propertyRegistry- to build the translator on- Returns:
- translator instance
-