public class JdbcIterator<T> extends Object implements Iterator<T>, Iterable<T>, Closeable
| Modifier and Type | Field and Description |
|---|---|
protected JdbcResultFactory<T> |
factory |
protected ResultSet |
result |
| Constructor and Description |
|---|
JdbcIterator(ResultSet result,
Class<T> resultClass) |
JdbcIterator(ResultSet result,
JdbcResultFactory<T> factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static void |
close(Iterator<?> iterator) |
static <U> JdbcIterator<U> |
execute(SqlQuery query,
Class<U> resultClass) |
static <U> JdbcIterator<U> |
execute(SqlQuery query,
JdbcResultFactory<U> factory) |
boolean |
hasNext() |
Iterator<T> |
iterator() |
protected void |
load() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorprotected final JdbcResultFactory<T> factory
protected ResultSet result
public JdbcIterator(ResultSet result, JdbcResultFactory<T> factory) throws SQLException
SQLExceptionpublic JdbcIterator(ResultSet result, Class<T> resultClass) throws SQLException
SQLExceptionpublic static <U> JdbcIterator<U> execute(SqlQuery query, Class<U> resultClass)
public static <U> JdbcIterator<U> execute(SqlQuery query, JdbcResultFactory<U> factory)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic static void close(Iterator<?> iterator)
protected void load()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly