java.lang.Object
org.jdaemon.util.sql.ResultSetIterator
- All Implemented Interfaces:
- java.util.Iterator
- public class ResultSetIterator
- extends java.lang.Object
- implements java.util.Iterator
Iterator facade for JDBC ResultSet object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connection
private ConnectionManager connection
results
private java.sql.ResultSet results
columns
private int columns
more
private boolean more
ResultSetIterator
public ResultSetIterator(ConnectionManager connection,
java.lang.String sql)
throws java.sql.SQLException,
org.jdaemon.util.resource.ResourceManagerException
- Creates a new instance of ResultSetIterator.
Takes ConnectionManager as argument. The constructor invokes connection.useConnection(). When
the final call to next() is made, connection.release() is called.
hasNext
public boolean hasNext()
- Check for more data in this iterator
- Specified by:
hasNext in interface java.util.Iterator
next
public java.lang.Object next()
- Get the next row of data
- Specified by:
next in interface java.util.Iterator
remove
public void remove()
- NOT SUPPORTED
- Specified by:
remove in interface java.util.Iterator