| Constructor and Description |
|---|
ResultSetIterator(ResultSet rs)
Constructor for ResultSetIterator.
|
ResultSetIterator(ResultSet rs,
RowProcessor convert)
Constructor for ResultSetIterator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if there are more rows in the ResultSet.
|
static Iterable<Object[]> |
iterable(ResultSet rs)
Generates an
Iterable, suitable for use in for-each loops. |
Object[] |
next()
Returns the next row as an
Object[]. |
void |
remove()
Deletes the current row from the
ResultSet. |
protected void |
rethrow(SQLException e)
Rethrow the SQLException as a RuntimeException.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ResultSetIterator(ResultSet rs)
rs - Wrap this ResultSet in an Iterator.public ResultSetIterator(ResultSet rs, RowProcessor convert)
rs - Wrap this ResultSet in an Iterator.convert - The processor to use when converting a row into an
Object[]. Defaults to a
BasicRowProcessor.public boolean hasNext()
hasNext in interface Iterator<Object[]>true if there are more rowsRuntimeException - if an SQLException occurs.public Object[] next()
Object[].next in interface Iterator<Object[]>Object[] with the same number of elements as
columns in the ResultSet.RuntimeException - if an SQLException occurs.Iterator.next()public void remove()
ResultSet.remove in interface Iterator<Object[]>RuntimeException - if an SQLException occurs.Iterator.remove()protected void rethrow(SQLException e)
e - SQLException to rethrowCopyright © 2002–2017 The Apache Software Foundation. All rights reserved.