Package org.ametys.cms.search.query
Class DateRangeQuery
java.lang.Object
org.ametys.cms.search.query.AbstractRangeQuery<AdaptableDate>
org.ametys.cms.search.query.DateRangeQuery
- All Implemented Interfaces:
Query
Represents a
Query testing a date range.-
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
ConstructorsConstructorDescriptionDateRangeQuery(String fieldPath, LocalDate from, LocalDate to) Build a date range query.DateRangeQuery(String fieldPath, LocalDate from, LocalDate to, boolean includeFrom, boolean includeTo) Build a date range query.DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to) Build a date range query.DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to, boolean includeFrom, boolean includeTo) Build a date range query. -
Method Summary
Modifier and TypeMethodDescriptionlowerBoundForQuery(AdaptableDate value) Computes the lower bound for Solr clientupperBoundForQuery(AdaptableDate value) Computes the upper bound for Solr clientMethods inherited from class org.ametys.cms.search.query.AbstractRangeQuery
build, equals, getFieldName, getLowerBound, getUpperBound, hashCode, includeLowerBound, includeUpperBoundMethods 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, rewrite, toString
-
Constructor Details
-
DateRangeQuery
Build a date range query.- Parameters:
fieldPath- The field path.from- The lower end of the range.to- The upper end of the range.
-
DateRangeQuery
Build a date range query.- Parameters:
fieldPath- The field path.from- The lower end of the range.to- The upper end of the range.
-
DateRangeQuery
public DateRangeQuery(String fieldPath, LocalDate from, LocalDate to, boolean includeFrom, boolean includeTo) Build a date range query.- Parameters:
fieldPath- The field path.from- The lower end of the range.to- The upper end of the range.includeFrom- Whether to include the lower end or not.includeTo- Whether to include the upper end or not.
-
DateRangeQuery
public DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to, boolean includeFrom, boolean includeTo) Build a date range query.- Parameters:
fieldPath- The field path.from- The lower end of the range.to- The upper end of the range.includeFrom- Whether to include the lower end or not.includeTo- Whether to include the upper end or not.
-
-
Method Details
-
lowerBoundForQuery
Description copied from class:AbstractRangeQueryComputes the lower bound for Solr client- Overrides:
lowerBoundForQueryin classAbstractRangeQuery<AdaptableDate>- Parameters:
value- the typed value- Returns:
- the value, adapted for Solr
-
upperBoundForQuery
Description copied from class:AbstractRangeQueryComputes the upper bound for Solr client- Overrides:
upperBoundForQueryin classAbstractRangeQuery<AdaptableDate>- Parameters:
value- the typed value- Returns:
- the value, adapted for Solr
-