Package com.valqueries
Class ResultSetIterator<T>
java.lang.Object
com.valqueries.ResultSetIterator<T>
- All Implemented Interfaces:
- AutoCloseable,- Iterator<T>
Used to create a Stream out of ResultSet and close it after the Stream is consumed.
- 
Constructor SummaryConstructorsConstructorDescriptionResultSetIterator(Connection connection, OrmStatement statement, IRowMapper<T> rowMapper, boolean autoClose) 
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.IteratorforEachRemaining, remove
- 
Constructor Details- 
ResultSetIteratorpublic ResultSetIterator(Connection connection, OrmStatement statement, IRowMapper<T> rowMapper, boolean autoClose) 
 
- 
- 
Method Details- 
hasNextpublic boolean hasNext()
- 
next
- 
closepublic void close()Closes the resultSet, preparedStatement, and possibly the connection, if it was provided in the constructor. The objects are closed in this order. If any exception is encountered it thrown after all objects were closed. Any subsequent exceptions are added as suppressed exceptions to the first one.- Specified by:
- closein interface- AutoCloseable
 
 
-