Class SidhantAggarwalBooleanQueryParser
java.lang.Object
dev.getelements.elements.dao.mongo.query.SidhantAggarwalBooleanQueryParser
- All Implemented Interfaces:
BooleanQueryParser
A
BooleanQueryParser
based on Sidhant Aggarwal's boolean query parser.
https://github.com/sidhant92/boolparser-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondev.morphia.Datastore
<QueryT> Optional
<dev.morphia.query.Query<QueryT>> Parses the supplied query and converts to the suppliedQuery
<QueryT> Optional
<dev.morphia.query.Query<QueryT>> Creates a newQuery
from the type and the query string.void
setDatastore
(dev.morphia.Datastore datastore) void
setOperators
(Set<BooleanQueryOperator> operators)
-
Constructor Details
-
SidhantAggarwalBooleanQueryParser
public SidhantAggarwalBooleanQueryParser()
-
-
Method Details
-
parse
Description copied from interface:BooleanQueryParser
Creates a newQuery
from the type and the query string.- Specified by:
parse
in interfaceBooleanQueryParser
- Type Parameters:
QueryT
-- Parameters:
cls
- the query typequery
- the query- Returns:
- the
Optional<dev.morphia.query.Query>
if the query successfully parsed
-
parse
public <QueryT> Optional<dev.morphia.query.Query<QueryT>> parse(dev.morphia.query.Query<QueryT> base, String query) Description copied from interface:BooleanQueryParser
Parses the supplied query and converts to the suppliedQuery
- Specified by:
parse
in interfaceBooleanQueryParser
- Type Parameters:
QueryT
-- Parameters:
base
- the base queryquery
- the query- Returns:
- the
Optional<dev.morphia.query.Query>
if the query successfully parsed
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getOperators
-
setOperators
-