public class JDBCResultIterator<T> extends Object implements ResultIterator<T>
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | closed | 
| protected boolean | nextRow | 
| protected ResultSet | resultSet | 
| protected Statement | statement | 
| Constructor and Description | 
|---|
| JDBCResultIterator(Statement statement,
                  ResultSet resultSet,
                  RowReader<T> rowReader)Creates new JDBCResultIterator that reads from provided ResultSet. | 
| Modifier and Type | Method and Description | 
|---|---|
| List<T> | allRows()Returns all yet unread rows from ResultSet without closing it. | 
| protected void | checkNextRow()Moves internal ResultSet cursor position down one row. | 
| void | close()Closes ResultIterator and associated ResultSet. | 
| boolean | hasNextRow()Returns true if there is at least one more record that can be read from
 the iterator. | 
| boolean | isClosingConnection()Deprecated. 
 since 4.0 always returns false. Connection closing is outside
             the scope of this iterator. See
              ConnectionAwareResultIteratorfor a replacement. | 
| Iterator<T> | iterator() | 
| T | nextRow()Returns the next result row that is, depending on the query, may be a
 scalar value, a DataRow, or an Object[] array containing a mix of scalars
 and DataRows. | 
| void | setClosingConnection(boolean flag)Deprecated. 
 since 4.0 does nothing. Connection closing is outside the
             scope of this iterator. See
              ConnectionAwareResultIteratorfor a replacement. | 
| void | skipRow()Goes past current row. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected Statement statement
protected ResultSet resultSet
protected boolean closed
protected boolean nextRow
public List<T> allRows()
ResultIteratorallRows in interface ResultIterator<T>public boolean hasNextRow()
hasNextRow in interface ResultIterator<T>public T nextRow()
ResultIteratornextRow in interface ResultIterator<T>public void skipRow()
ResultIteratorskipRow in interface ResultIterator<T>public void close()
           throws NoSuchElementException
close in interface AutoCloseableclose in interface ResultIterator<T>NoSuchElementExceptionprotected void checkNextRow()
@Deprecated public boolean isClosingConnection()
ConnectionAwareResultIterator for a replacement.@Deprecated public void setClosingConnection(boolean flag)
ConnectionAwareResultIterator for a replacement.closingConnection property.Copyright © 2001–2023 Apache Cayenne. All rights reserved.