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
ConstructorDescriptionAbstractOperatorQuery
(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.boolean
Returns the Solr field name.Return theQuery.Operator
getValue()
Returns the typed valueint
hashCode()
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, wait
Methods 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.Operator
value
- 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:Query
Build the solr query string representing the Query object.- Specified by:
build
in 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:Query
Rewrite this Query to allow further optimisations. -
hashCode
-
equals
-