T
- the type to fetch from the result setpublic interface ResultIterator<T>
extends java.lang.AutoCloseable
hasNext()
method is not idempotent, calling it moves
the cursor in the underlying result set so next()
must be called
before hasNext()
is called again or you will miss rows.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying result set and other resources held by this iterator
|
boolean |
hasNext()
Returns true if a row is available in the underlying result set.
|
T |
next() |
boolean hasNext() throws java.sql.SQLException
next()
must be called
before this method is called again or you will miss rows.
Calls close()
before returning false when iteration has been completed.java.sql.SQLException
- in case of an exceptionT next() throws java.sql.SQLException
java.sql.SQLException
- in case of an exceptionvoid close()
close
in interface java.lang.AutoCloseable