Package org.ametys.cms.search.query
Class LongRangeQuery
- java.lang.Object
-
- org.ametys.cms.search.query.AbstractFieldQuery
-
- org.ametys.cms.search.query.LongRangeQuery
-
- All Implemented Interfaces:
Query
public class LongRangeQuery extends AbstractFieldQuery
Represents aQuery
testing a long range.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_includeLower
True to include the lower end, false to exclude it.protected boolean
_includeUpper
True to include the upper end, false to exclude it.protected long
_lower
The lower end of the long range.protected long
_upper
The upper end of the long range.-
Fields inherited from class org.ametys.cms.search.query.AbstractFieldQuery
_fieldPath
-
-
Constructor Summary
Constructors Constructor Description LongRangeQuery(String fieldPath, long lower, long upper)
Build a long range query.LongRangeQuery(String fieldPath, long lower, long upper, boolean includelower, boolean includeTo)
Build a long range query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
build()
Build the solr query string representing the Query object.boolean
equals(Object obj)
int
hashCode()
-
Methods inherited from class org.ametys.cms.search.query.AbstractFieldQuery
getFieldPath
-
-
-
-
Field Detail
-
_lower
protected long _lower
The lower end of the long range.
-
_upper
protected long _upper
The upper end of the long range.
-
_includeLower
protected boolean _includeLower
True to include the lower end, false to exclude it.
-
_includeUpper
protected boolean _includeUpper
True to include the upper end, false to exclude it.
-
-
Constructor Detail
-
LongRangeQuery
public LongRangeQuery(String fieldPath, long lower, long upper)
Build a long range query.- Parameters:
fieldPath
- The field path.lower
- The lower end of the range.upper
- The upper end of the range.
-
LongRangeQuery
public LongRangeQuery(String fieldPath, long lower, long upper, boolean includelower, boolean includeTo)
Build a long 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.includeTo
- Whether to include the upper end or not.
-
-
Method Detail
-
build
public String build() throws QuerySyntaxException
Description copied from interface:Query
Build the solr query string representing the Query object.- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException
- if the query can't be built because of a syntax error.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractFieldQuery
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classAbstractFieldQuery
-
-