| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.access.jdbc.JDBCResultIterator
public class JDBCResultIterator
A ResultIterator over the underlying JDBC ResultSet.
| Field Summary | |
|---|---|
| protected  boolean | closed | 
| protected  boolean | closingConnection | 
| protected  Connection | connection | 
| protected  boolean | nextRow | 
| protected  QueryMetadata | queryMetadata | 
| protected  ResultSet | resultSet | 
| protected  RowDescriptor | rowDescriptor | 
| protected  Statement | statement | 
| Constructor Summary | |
|---|---|
| JDBCResultIterator(Connection connection,
                   Statement statement,
                   ResultSet resultSet,
                   RowDescriptor descriptor,
                   QueryMetadata queryMetadata)Creates new JDBCResultIterator that reads from provided ResultSet. | |
| Method Summary | |
|---|---|
|  List<?> | 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. | 
|  RowDescriptor | getRowDescriptor() | 
|  boolean | hasNextRow()Returns true if there is at least one more record that can be read from the iterator. | 
|  boolean | isClosingConnection()Returns trueif this iterator is responsible for closing its
 connection, otherwise a user of the iterator must close the connection after
 closing the iterator. | 
|  Object | 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)Sets the closingConnectionproperty. | 
|  void | skipRow() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Connection connection
protected Statement statement
protected ResultSet resultSet
protected RowDescriptor rowDescriptor
protected QueryMetadata queryMetadata
protected boolean closingConnection
protected boolean closed
protected boolean nextRow
| Constructor Detail | 
|---|
public JDBCResultIterator(Connection connection,
                          Statement statement,
                          ResultSet resultSet,
                          RowDescriptor descriptor,
                          QueryMetadata queryMetadata)
                   throws CayenneException
CayenneException| Method Detail | 
|---|
public List<?> allRows()
                throws CayenneException
ResultIterator
allRows in interface ResultIteratorCayenneExceptionpublic boolean hasNextRow()
hasNextRow in interface ResultIterator
public Object nextRow()
               throws CayenneException
ResultIterator
nextRow in interface ResultIteratorCayenneException
public void skipRow()
             throws CayenneException
skipRow in interface ResultIteratorCayenneException
public void close()
           throws CayenneException
close in interface ResultIteratorCayenneException
protected void checkNextRow()
                     throws CayenneException
CayenneExceptionpublic boolean isClosingConnection()
true if this iterator is responsible for closing its
 connection, otherwise a user of the iterator must close the connection after
 closing the iterator.
public void setClosingConnection(boolean flag)
closingConnection property.
public RowDescriptor getRowDescriptor()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||