public interface BlueQuery<V extends java.io.Serializable>
Modifier and Type | Method and Description |
---|---|
BlueQuery<V> |
afterOrAtTime(long time)
Adds an inclusive min time for the queried time interval.
|
BlueQuery<V> |
afterTime(long time)
Adds an exclusive min time for the queried time interval.
|
BlueQuery<V> |
beforeOrAtTime(long time)
Adds an inclusive max time for the queried time interval.
|
BlueQuery<V> |
beforeTime(long time)
Adds an exclusive max time for the queried time interval.
|
BlueQuery<V> |
byStartTime()
For queries on a collection with a key type of
TimeFrameKey , this adds a condition that the value starts in the
queried interval. |
int |
count()
Executes the query and returns the number of values matching the query
|
void |
delete()
Executes the query and deletes any matching values
|
CloseableIterator<V> |
getIterator()
Begins executing the query and returns an iterator for processing the results.
|
java.util.List<V> |
getList()
Executes the query and returns the results as a list.
|
void |
replace(Mapper<V> mapper)
Executes the query and replaces any matching values
|
void |
update(Updater<V> updater)
Executes the query and updates any matching values
|
BlueQuery<V> |
where(Condition<V> condition)
Adds a condition to the query before returning itself.
|
BlueQuery<V> where(Condition<V> condition)
condition
- a filter function to be applied to possible matching valuesBlueQuery<V> byStartTime()
TimeFrameKey
, this adds a condition that the value starts in the
queried interval. Normally, it is only required that the value's time interval overlaps the queried time interval.
TimeFrameKey
BlueQuery<V> beforeTime(long time)
TimeFrameKey
this means that it starts
before the specified time. For a TimeKey
it means that it is before the specified time. It doesn't make
sense to use it with other key types.time
- an exclusive max time (millis since epoch) for the queried time intervalBlueQuery<V> beforeOrAtTime(long time)
TimeFrameKey
this means that it starts
before or at the specified time. For a TimeKey
it means that it is before or at the specified time. It doesn't
make sense to use it with other key types.time
- an inclusive max time (millis since epoch) for the queried time intervalBlueQuery<V> afterTime(long time)
TimeFrameKey
this means that it ends
after the specified time. For a TimeKey
it means that it is after the specified time. It doesn't make
sense to use it with other key types.time
- an exclusive min time (millis since epoch) for the queried time intervalBlueQuery<V> afterOrAtTime(long time)
TimeFrameKey
this means that it ends
after or at the specified time. For a TimeKey
it means that it is after or at the specified time. It doesn't
make sense to use it with other key types.time
- an inclusive min time (millis since epoch) for the queried time intervaljava.util.List<V> getList() throws BlueDbException
BlueDbException
CloseableIterator<V> getIterator() throws BlueDbException
BlueDbException
void delete() throws BlueDbException
BlueDbException
void update(Updater<V> updater) throws BlueDbException
updater
- a function that mutates the values in the query resultsBlueDbException
- if there are any problems, such as an exception thrown by the updatervoid replace(Mapper<V> mapper) throws BlueDbException
mapper
- a function that replaces the values in the query resultsBlueDbException
- if there are any problems, such as an exception thrown by the mapperint count() throws BlueDbException
BlueDbException