Package org.ametys.cms.search.query
Class DoubleRangeQuery
- All Implemented Interfaces:
Query
Represents a
Query
testing a double 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
ConstructorDescriptionDoubleRangeQuery
(String fieldPath, double lower, double upper) Build a double range query.DoubleRangeQuery
(String fieldPath, double lower, double upper, boolean includeLower, boolean includeUpper) Build a double range query. -
Method Summary
Modifier and TypeMethodDescriptionlowerBoundForQuery
(Double value) Computes the lower bound for Solr clientupperBoundForQuery
(Double value) Computes the upper bound for Solr clientMethods inherited from class org.ametys.cms.search.query.AbstractRangeQuery
build, equals, getFieldName, getLowerBound, getUpperBound, hashCode, includeLowerBound, includeUpperBound
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, rewrite, toString
-
Constructor Details
-
DoubleRangeQuery
Build a double range query.- Parameters:
fieldPath
- The field path.lower
- The lower end of the range.upper
- The upper end of the range.
-
DoubleRangeQuery
public DoubleRangeQuery(String fieldPath, double lower, double upper, boolean includeLower, boolean includeUpper) Build a double range query.- Parameters:
fieldPath
- The field path.lower
- The lower end of the range.upper
- The upper end of the range.includeLower
- Whether to include the lower end or not.includeUpper
- Whether to include the upper end or not.
-
-
Method Details
-
lowerBoundForQuery
Description copied from class:AbstractRangeQuery
Computes the lower bound for Solr client- Overrides:
lowerBoundForQuery
in classAbstractRangeQuery<Double>
- Parameters:
value
- the typed value- Returns:
- the value, adapted for Solr
-
upperBoundForQuery
Description copied from class:AbstractRangeQuery
Computes the upper bound for Solr client- Overrides:
upperBoundForQuery
in classAbstractRangeQuery<Double>
- Parameters:
value
- the typed value- Returns:
- the value, adapted for Solr
-