Package org.ametys.cms.search.query
Class AbstractDateOperatorQuery
java.lang.Object
org.ametys.cms.search.query.AbstractOperatorQuery<AdaptableDate>
org.ametys.cms.search.query.AbstractDateOperatorQuery
- Direct Known Subclasses:
CreationDateQuery
,DateQuery
,DateTimeQuery
,DublinCoreDateQuery
,FirstValidationDateQuery
,LastMajorValidationDateQuery
,LastModifiedQuery
,LastValidationDateQuery
Base class for all date and 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
ConstructorDescriptionAbstractDateOperatorQuery
(String fieldName, Query.Operator op, AdaptableDate value) Build a CreationDateQuery. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendDateValue
(StringBuilder query, Query.Operator operator, AdaptableDate value) Format and append the given date to a StringBuilder.build()
Build the solr query string representing the Query object.Methods inherited from class org.ametys.cms.search.query.AbstractOperatorQuery
equals, getFieldName, getOperator, getValue, hashCode, rewrite, valueForQuery
Methods 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
-
Field Details
-
DATE_FORMATTER
The date formatter
-
-
Constructor Details
-
AbstractDateOperatorQuery
Build a CreationDateQuery.- Parameters:
fieldName
- the Solr field nameop
- the operator.value
- the value.
-
-
Method Details
-
build
Description copied from interface:Query
Build the solr query string representing the Query object.- Specified by:
build
in interfaceQuery
- Overrides:
build
in classAbstractOperatorQuery<AdaptableDate>
- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
appendDateValue
Format and append the given date to a StringBuilder.- Parameters:
query
- The string builder containing the query being built.operator
- The query operator.value
- The test value.
-