V - type of the objects contained in the result set.public class ResultSetBasedObjectResultSet<V> extends Object implements ObjectResultSet<V>
Object result-set implementation that is backed by a Cassandra
ResultSet. This implementation delegates most of the methods to
the backing ResultSet. However, it uses a user-supplied function
for converting the Rows in the result set to the appropriate
object type.
Like indicated for the ObjectResultSet interface, this class is
not thread safe.
ObjectResultSet.ObjectResultSetIterator<V>| Constructor and Description |
|---|
ResultSetBasedObjectResultSet(ResultSet resultSet,
Function<? super Row,? extends V> converterFunction)
Creates a object result-set that is backed by the specified Cassandra
result-set.
|
| Modifier and Type | Method and Description |
|---|---|
List<V> |
all() |
ListenableFuture<Void> |
fetchMoreResults() |
int |
getAvailableWithoutFetching() |
boolean |
isExhausted() |
boolean |
isFullyFetched() |
Iterator<V> |
iterator() |
V |
one() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic ResultSetBasedObjectResultSet(ResultSet resultSet, Function<? super Row,? extends V> converterFunction)
Creates a object result-set that is backed by the specified Cassandra result-set. Each time an object is requested, this class fetches a row from the backing result set and calls the specified converter function to convert the row to an object.
The converter function will never be called with a null
argument.
resultSet - result set that provides the rows that represent the objects
in the object result-set.converterFunction - function that converts rows to objects. The function is called
exactly once for every row that is fetched from the backing
result set.public List<V> all()
all in interface ObjectResultSet<V>public ListenableFuture<Void> fetchMoreResults()
fetchMoreResults in interface ObjectResultSet<V>public int getAvailableWithoutFetching()
getAvailableWithoutFetching in interface ObjectResultSet<V>public boolean isExhausted()
isExhausted in interface ObjectResultSet<V>public boolean isFullyFetched()
isFullyFetched in interface ObjectResultSet<V>public V one()
one in interface ObjectResultSet<V>Copyright © 2011–2017 aquenos GmbH. All rights reserved.