|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.stmt.SelectIterator<T,ID>
public class SelectIterator<T,ID>
Internal iterator so we can page through the class. This is used by the Dao.iterator() methods.
| Constructor Summary | |
|---|---|
SelectIterator(Class<?> dataClass,
Dao<T,ID> classDao,
GenericRowMapper<T> rowMapper,
ConnectionSource connectionSource,
DatabaseConnection connection,
CompiledStatement compiledStmt,
String statement,
ObjectCache objectCache)
If the statement parameter is null then this won't log information |
|
| Method Summary | |
|---|---|
void |
close()
Close any underlying SQL statements. |
DatabaseResults |
getRawResults()
Return the underlying database results object if any. |
boolean |
hasNext()
Returns whether or not there are any remaining objects in the table. |
boolean |
hasNextThrow()
Returns whether or not there are any remaining objects in the table. |
T |
next()
Returns the next() object in the table. |
T |
nextThrow()
Returns the next() object in the table. |
void |
remove()
Removes the last object returned by next() by calling delete on the dao associated with the object. |
void |
removeThrow()
Removes the last object returned by next() by calling delete on the dao associated with the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectIterator(Class<?> dataClass,
Dao<T,ID> classDao,
GenericRowMapper<T> rowMapper,
ConnectionSource connectionSource,
DatabaseConnection connection,
CompiledStatement compiledStmt,
String statement,
ObjectCache objectCache)
throws SQLException
SQLException| Method Detail |
|---|
public boolean hasNextThrow()
throws SQLException
SQLException - If there was a problem getting more results via SQL.public boolean hasNext()
hasNext in interface Iterator<T>IllegalStateException - If there was a problem getting more results via SQL.
public T nextThrow()
throws SQLException
SQLException - If there was a problem extracting the object from SQL.public T next()
next in interface Iterator<T>IllegalStateException - If there was a problem extracting the object from SQL.
public void removeThrow()
throws SQLException
IllegalStateException - If there was no previous next() call.
SQLException - If the delete failed.public void remove()
remove in interface Iterator<T>IllegalStateException - If there was no previous next() call or if delete() throws a SQLException (set as the cause).
public void close()
throws SQLException
CloseableIterator
close in interface CloseableIterator<T>SQLExceptionpublic DatabaseResults getRawResults()
CloseableIterator
getRawResults in interface CloseableIterator<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||