play.db.helper
Class JdbcIterator<T>
java.lang.Object
play.db.helper.JdbcIterator<T>
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Iterable<T>, java.util.Iterator<T>
- Direct Known Subclasses:
- JdbcWindowIterator
public class JdbcIterator<T>
- extends java.lang.Object
- implements java.util.Iterator<T>, java.lang.Iterable<T>, java.io.Closeable
Iterate over a JDBC ResultSet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
protected final JdbcResultFactory<T> factory
result
protected java.sql.ResultSet result
JdbcIterator
public JdbcIterator(java.sql.ResultSet result,
JdbcResultFactory<T> factory)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
JdbcIterator
public JdbcIterator(java.sql.ResultSet result,
java.lang.Class<T> resultClass)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
execute
public static <U> JdbcIterator<U> execute(SqlQuery query,
java.lang.Class<U> resultClass)
execute
public static <U> JdbcIterator<U> execute(SqlQuery query,
JdbcResultFactory<U> factory)
close
public void close()
- Specified by:
close
in interface java.io.Closeable
close
public static void close(java.util.Iterator<?> iterator)
load
protected void load()
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<T>
next
public T next()
- Specified by:
next
in interface java.util.Iterator<T>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<T>
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<T>
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly