B - the builderpublic abstract class AbstractQueryBuilder<B extends AbstractQueryBuilder<B>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Long |
endAbsolute |
protected RelativeTime |
endRelative |
protected com.google.gson.Gson |
mapper |
protected Long |
startAbsolute |
protected RelativeTime |
startRelative |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractQueryBuilder() |
| Modifier and Type | Method and Description |
|---|---|
String |
build()
Returns the JSON string built by the builder.
|
protected abstract com.google.gson.Gson |
buildGson()
Builds Gson used by this implementation
|
boolean |
equals(Object o) |
Date |
getEndAbsolute()
Returns the absolute range end time.
|
RelativeTime |
getEndRelative()
Returns the relative range end time.
|
Date |
getStartAbsolute()
Returns the absolute range start time.
|
RelativeTime |
getStartRelative()
Returns the relative range start time.
|
int |
hashCode() |
B |
setEnd(Date end)
The ending value of the time range.
|
B |
setEnd(int duration,
TimeUnit unit)
The ending time of the time range relative to now.
|
B |
setStart(Date start)
The beginning time of the time range.
|
B |
setStart(int duration,
TimeUnit unit)
The beginning time of the time range relative to now.
|
protected Long startAbsolute
protected Long endAbsolute
protected RelativeTime startRelative
protected RelativeTime endRelative
protected transient com.google.gson.Gson mapper
protected abstract com.google.gson.Gson buildGson()
public Date getStartAbsolute()
public Date getEndAbsolute()
public RelativeTime getStartRelative()
public RelativeTime getEndRelative()
public B setStart(Date start)
start - start timepublic B setStart(int duration, TimeUnit unit)
duration - relative time valueunit - unit of timepublic B setEnd(Date end)
end - end timepublic B setEnd(int duration, TimeUnit unit)
duration - relative time valueunit - unit of timepublic String build() throws IOException
IOException - if the query is invalid and cannot be converted to JSONCopyright © 2018. All rights reserved.