Package org.ametys.cms.search.query
Class AbstractOperatorQuery<T>
java.lang.Object
org.ametys.cms.search.query.AbstractOperatorQuery<T>
- Type Parameters:
T- the value type.
- Direct Known Subclasses:
AbstractDateOperatorQuery,AbstractMultivaluedQuery,AbstractTextQuery,BooleanQuery,ContentQuery,DocumentTypeQuery,DoubleQuery,DublinCoreQuery,EntryPositionQuery,FilenameQuery,GeocodeQuery,HasLiveVersionQuery,LongQuery,MimeTypeGroupQuery
Base class for all operator-based queries.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator -
Field Summary
Fields inherited from interface org.ametys.cms.search.query.Query
BOOL_FILTER, BOOL_MUST, BOOL_MUST_NOT, BOOL_SHOULD -
Constructor Summary
ConstructorsConstructorDescriptionAbstractOperatorQuery(String fieldName, Query.Operator operator, T value) Create a new Query -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the solr query string representing the Query object.booleanReturns the Solr field name.Return theQuery.OperatorgetValue()Returns the typed valueinthashCode()rewrite()Rewrite this Query to allow further optimisations.valueForQuery(T value) Computes the value for Solr clientMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.search.query.Query
buildAsJson, toString
-
Constructor Details
-
AbstractOperatorQuery
Create a new Query- Parameters:
fieldName- the Solr field nameoperator- theQuery.Operatorvalue- the value
-
-
Method Details
-
getOperator
Return theQuery.Operator- Returns:
- the operator
-
getValue
Returns the typed value- Returns:
- the value
-
getFieldName
Returns the Solr field name.- Returns:
- the field name
-
valueForQuery
Computes the value for Solr client- Parameters:
value- the typed value- Returns:
- the value, adapted for Solr
-
build
Description copied from interface:QueryBuild the solr query string representing the Query object.- Specified by:
buildin interfaceQuery- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-
rewrite
Description copied from interface:QueryRewrite this Query to allow further optimisations. -
hashCode
-
equals
-