Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.objectstyle.cayenne.access
Class DefaultResultIterator

    java.lang.Object
      org.objectstyle.cayenne.access.DefaultResultIterator

All Implemented Interfaces:
  ResultIterator

Deprecated. Since 1.2 replaced by JDBCResultIterator.

    public class DefaultResultIterator

extends java.lang.Object
implements ResultIterator

Default implementation of ResultIterator interface. Serves as a factory that creates data rows from `java.sql.ResultSet`.

For more information see Cayenne User Guide.

Author:
  Andrei Adamchik

Field Summary
`protected boolean` | `closingConnection` Deprecated.
`protected java.sql.Connection` | `connection` Deprecated.
`protected ResultDescriptor` | `descriptor` Deprecated.
`protected int` | `fetchedSoFar` Deprecated.
`protected int` | `fetchLimit` Deprecated.
`protected boolean` | `isClosed` Deprecated.
`protected int` | `mapCapacity` Deprecated.
`protected boolean` | `nextRow` Deprecated.
`protected java.sql.ResultSet` | `resultSet` Deprecated.
`protected java.sql.Statement` | `statement` Deprecated.

Constructor Summary
`DefaultResultIterator(java.sql.Connection connection, java.sql.Statement statement, java.sql.ResultSet resultSet, ResultDescriptor descriptor, int fetchLimit)` Deprecated.

Method Summary
`protected void` | `checkNextRow()` Deprecated. Moves internal ResultSet cursor position down one row.
`void` | `close()` Deprecated. Closes ResultIterator and associated ResultSet.
`java.util.List` | `dataRows(boolean close)` Deprecated. Returns all unread data rows from ResultSet, closing this iterator if needed.
`int` | `getDataRowWidth()` Deprecated. Returns the number of columns in the result row.
`boolean` | `hasNextRow()` Deprecated. Returns true if there is at least one more record that can be read from the iterator.
`boolean` | `isClosingConnection()` Deprecated. Returns `true` if this iterator is responsible for closing its connection, otherwise a user of the iterator must close the connection after closing the iterator.
`java.util.Map` | `nextDataRow()` Deprecated. Returns the next result row as a Map.
`java.util.Map` | `nextObjectId(DbEntity entity)` Deprecated. Returns a map of ObjectId values from the next result row.
`protected java.util.Map` | `readDataRow()` Deprecated. Reads a row from the internal ResultSet at the current cursor position.
`protected java.util.Map` | `readIdRow(DbEntity entity)` Deprecated. Reads a row from the internal ResultSet at the current cursor position, processing only columns that are part of the ObjectId of a target class.
`static java.util.Map` | `readProcedureOutParameters(java.sql.CallableStatement statement, ResultDescriptor resultDescriptor)` Deprecated. Utility method to read stored procedure out parameters as a map.
`void` | `setClosingConnection(boolean flag)` Deprecated. Sets the `closingConnection` property.
`void` | `skipDataRow()` Deprecated. Skips current data row instead of reading it.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### connection

    protected java.sql.Connection connection

  Deprecated.

### statement

    protected java.sql.Statement statement

  Deprecated.

### resultSet

    protected java.sql.ResultSet resultSet

  Deprecated.

### descriptor

    protected ResultDescriptor descriptor

  Deprecated.

### mapCapacity

    protected int mapCapacity

  Deprecated.

### closingConnection

    protected boolean closingConnection

  Deprecated.

### isClosed

    protected boolean isClosed

  Deprecated.

### nextRow

    protected boolean nextRow

  Deprecated.

### fetchedSoFar

    protected int fetchedSoFar

  Deprecated.

### fetchLimit

    protected int fetchLimit

  Deprecated.

Constructor Detail

### DefaultResultIterator

    public DefaultResultIterator(java.sql.Connection connection,
                                 java.sql.Statement statement,
                                 java.sql.ResultSet resultSet,
                                 ResultDescriptor descriptor,
                                 int fetchLimit)
                          throws java.sql.SQLException,
                                 CayenneException

  Deprecated.
  Throws:
    `java.sql.SQLException`
    `CayenneException`

Method Detail

### readProcedureOutParameters

    public static java.util.Map readProcedureOutParameters(java.sql.CallableStatement statement,
                                                           ResultDescriptor resultDescriptor)
                                                    throws java.sql.SQLException,
                                                           java.lang.Exception

  Deprecated.
  Utility method to read stored procedure out parameters as a map. Returns an empty map if no out parameters exist.

  Throws:
    `java.sql.SQLException`
    `java.lang.Exception`

### checkNextRow

    protected void checkNextRow()
                         throws java.sql.SQLException,
                                CayenneException

  Deprecated.
  Moves internal ResultSet cursor position down one row. Checks if the next row is available.

  Throws:
    `java.sql.SQLException`
    `CayenneException`

### hasNextRow

    public boolean hasNextRow()

  Deprecated.
  Returns true if there is at least one more record that can be read from the iterator.

  Specified by:
    `hasNextRow` in interface `ResultIterator`

### nextDataRow

    public java.util.Map nextDataRow()
                              throws CayenneException

  Deprecated.
  Returns the next result row as a Map.

  Specified by:
    `nextDataRow` in interface `ResultIterator`
  Throws:
    `CayenneException`

### getDataRowWidth

    public int getDataRowWidth()

  Deprecated.
  Returns the number of columns in the result row.

  Specified by:
    `getDataRowWidth` in interface `ResultIterator`
  Since:
    1.0.6

### dataRows

    public java.util.List dataRows(boolean close)
                            throws CayenneException

  Deprecated.
  Returns all unread data rows from ResultSet, closing this iterator if needed.

  Specified by:
    `dataRows` in interface `ResultIterator`
  Throws:
    `CayenneException`

### readDataRow

    protected java.util.Map readDataRow()
                                 throws java.sql.SQLException,
                                        CayenneException

  Deprecated.
  Reads a row from the internal ResultSet at the current cursor position.

  Throws:
    `java.sql.SQLException`
    `CayenneException`

### readIdRow

    protected java.util.Map readIdRow(DbEntity entity)
                               throws java.sql.SQLException,
                                      CayenneException

  Deprecated.
  Reads a row from the internal ResultSet at the current cursor position, processing only columns that are part of the ObjectId of a target class.

  Throws:
    `java.sql.SQLException`
    `CayenneException`

### close

    public void close()
               throws CayenneException

  Deprecated.
  Closes ResultIterator and associated ResultSet. This method must be called explicitly when the user is finished processing the records. Otherwise unused database resources will not be released properly.

  Specified by:
    `close` in interface `ResultIterator`
  Throws:
    `CayenneException`

### isClosingConnection

    public boolean isClosingConnection()

  Deprecated.
  Returns `true` if this iterator is responsible for closing its connection, otherwise a user of the iterator must close the connection after closing the iterator.

### setClosingConnection

    public void setClosingConnection(boolean flag)

  Deprecated.
  Sets the `closingConnection` property.

### skipDataRow

    public void skipDataRow()
                     throws CayenneException

  Deprecated.
  Description copied from interface: `ResultIterator`
  Skips current data row instead of reading it.

  Specified by:
    `skipDataRow` in interface `ResultIterator`
  Throws:
    `CayenneException`
  See Also:
    `ResultIterator.skipDataRow()`

### nextObjectId

    public java.util.Map nextObjectId(DbEntity entity)
                               throws CayenneException

  Deprecated.
  Returns a map of ObjectId values from the next result row. Primary key columns are determined from the provided DbEntity.

  Specified by:
    `nextObjectId` in interface `ResultIterator`
  Throws:
    `CayenneException`
  Since:
    1.1

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 ObjectStyle.org All Rights Reserved.