public class DateRangeQuery extends AbstractFieldQuery
Query
testing a date range.Query.LogicalOperator, Query.Operator
Modifier and Type | Field and Description |
---|---|
protected AdaptableDate |
_from
The lower end of the date range.
|
protected boolean |
_includeFrom
True to include the lower end, false to exclude it.
|
protected boolean |
_includeTo
True to include the upper end, false to exclude it.
|
protected AdaptableDate |
_to
The upper end of the date range.
|
_fieldPath
Constructor and Description |
---|
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.
|
DateRangeQuery(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.
|
Modifier and Type | Method and Description |
---|---|
String |
build()
Build the solr query string representing the Query object.
|
boolean |
equals(Object obj) |
int |
hashCode() |
getFieldPath
protected AdaptableDate _from
protected AdaptableDate _to
protected boolean _includeFrom
protected boolean _includeTo
public DateRangeQuery(String fieldPath, LocalDate from, LocalDate to)
fieldPath
- The field path.from
- The lower end of the range.to
- The upper end of the range.public DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to)
fieldPath
- The field path.from
- The lower end of the range.to
- The upper end of the range.public DateRangeQuery(String fieldPath, LocalDate from, LocalDate to, boolean includeFrom, boolean includeTo)
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.public DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to, boolean includeFrom, boolean includeTo)
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.public String build() throws QuerySyntaxException
Query
QuerySyntaxException
- if the query can't be built because of a syntax error.public int hashCode()
hashCode
in class AbstractFieldQuery
public boolean equals(Object obj)
equals
in class AbstractFieldQuery