Constructor and Description |
---|
BlueQueryOnDisk(BlueCollectionOnDisk<T> collection) |
Modifier and Type | Method and Description |
---|---|
BlueQuery<T> |
afterOrAtTime(long time)
Adds an inclusive min time for the queried time interval.
|
BlueQuery<T> |
afterTime(long time)
Adds an exclusive min time for the queried time interval.
|
BlueQuery<T> |
beforeOrAtTime(long time)
Adds an inclusive max time for the queried time interval.
|
BlueQuery<T> |
beforeTime(long time)
Adds an exclusive max time for the queried time interval.
|
BlueQuery<T> |
byStartTime()
For queries on a collection with a key type of
TimeFrameKey , this adds a condition that the value starts in the
queried interval. |
BlueQueryOnDisk<T> |
clone() |
int |
count()
Executes the query and returns the number of values matching the query
|
void |
delete()
Executes the query and deletes any matching values
|
java.util.List<BlueEntity<T>> |
getEntities() |
CloseableIterator<T> |
getIterator()
Begins executing the query and returns an iterator for processing the results.
|
java.util.List<T> |
getList()
Executes the query and returns the results as a list.
|
Range |
getRange() |
void |
replace(Mapper<T> mapper)
Executes the query and replaces any matching values
|
java.lang.String |
toString() |
void |
update(Updater<T> updater)
Executes the query and updates any matching values
|
BlueQuery<T> |
where(Condition<T> c)
Adds a condition to the query before returning itself.
|
public BlueQueryOnDisk(BlueCollectionOnDisk<T> collection)
public BlueQuery<T> where(Condition<T> c)
BlueQuery
public BlueQuery<T> afterTime(long time)
BlueQuery
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.public BlueQuery<T> afterOrAtTime(long time)
BlueQuery
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.afterOrAtTime
in interface BlueQuery<T extends java.io.Serializable>
time
- an inclusive min time (millis since epoch) for the queried time intervalpublic BlueQuery<T> beforeTime(long time)
BlueQuery
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.beforeTime
in interface BlueQuery<T extends java.io.Serializable>
time
- an exclusive max time (millis since epoch) for the queried time intervalpublic BlueQuery<T> beforeOrAtTime(long time)
BlueQuery
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.beforeOrAtTime
in interface BlueQuery<T extends java.io.Serializable>
time
- an inclusive max time (millis since epoch) for the queried time intervalpublic BlueQuery<T> byStartTime()
BlueQuery
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
byStartTime
in interface BlueQuery<T extends java.io.Serializable>
public java.util.List<T> getList() throws BlueDbException
BlueQuery
getList
in interface BlueQuery<T extends java.io.Serializable>
BlueDbException
public CloseableIterator<T> getIterator() throws BlueDbException
BlueQuery
getIterator
in interface BlueQuery<T extends java.io.Serializable>
BlueDbException
public void delete() throws BlueDbException
BlueQuery
delete
in interface BlueQuery<T extends java.io.Serializable>
BlueDbException
public void update(Updater<T> updater) throws BlueDbException
BlueQuery
update
in interface BlueQuery<T extends java.io.Serializable>
updater
- a function that mutates the values in the query resultsBlueDbException
- if there are any problems, such as an exception thrown by the updaterpublic void replace(Mapper<T> mapper) throws BlueDbException
BlueQuery
replace
in interface BlueQuery<T extends java.io.Serializable>
mapper
- a function that replaces the values in the query resultsBlueDbException
- if there are any problems, such as an exception thrown by the mapperpublic int count() throws BlueDbException
BlueQuery
count
in interface BlueQuery<T extends java.io.Serializable>
BlueDbException
public java.util.List<BlueEntity<T>> getEntities() throws BlueDbException
BlueDbException
public BlueQueryOnDisk<T> clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public Range getRange()