com.j256.ormlite.dao
Interface CloseableIterator<T>

All Superinterfaces:
Iterator<T>
All Known Implementing Classes:
SelectIterator

public interface CloseableIterator<T>
extends Iterator<T>

Extension to Iterator to provide a close() method. This should be in the JDK.

NOTE: You must call close() method when you are done otherwise the underlying SQL statement and connection may be kept open.

Author:
graywatson

Method Summary
 void close()
          Close any underlying SQL statements.
 DatabaseResults getRawResults()
          Return the underlying database results object if any.
 void moveToNext()
          Move to the next item in the iterator without calling Iterator.next().
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

close

void close()
           throws SQLException
Close any underlying SQL statements.

Throws:
SQLException

getRawResults

DatabaseResults getRawResults()
Return the underlying database results object if any. May return null. This should not be used unless you know what you are doing.


moveToNext

void moveToNext()
Move to the next item in the iterator without calling Iterator.next().



This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.