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

## org.apache.cayenne.access.jdbc
Class LimitResultIterator

    java.lang.Object
      org.apache.cayenne.access.jdbc.LimitResultIterator

All Implemented Interfaces:
  ResultIterator

    public class LimitResultIterator

extends Object
implements ResultIterator

Since:
  3.0

Field Summary
`protected int` | `fetchedSoFar`
`protected int` | `fetchLimit`
`protected Map<String,Object>` | `nextDataObjectIds`
`protected boolean` | `nextRow`
`protected int` | `offset`
`protected ResultIterator` | `wrappedIterator`

Constructor Summary
`LimitResultIterator(ResultIterator wrappedIterator, int offset, int fetchLimit)`

Method Summary
`List<?>` | `allRows()` Returns all yet unread rows from ResultSet without closing it.
`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.
`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` | `skipRow()`

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

Field Detail

### wrappedIterator

    protected ResultIterator wrappedIterator

### nextDataObjectIds

    protected Map<String,Object> nextDataObjectIds

### fetchLimit

    protected int fetchLimit

### offset

    protected int offset

### fetchedSoFar

    protected int fetchedSoFar

### nextRow

    protected boolean nextRow

Constructor Detail

### LimitResultIterator

    public LimitResultIterator(ResultIterator wrappedIterator,
                               int offset,
                               int fetchLimit)
                        throws CayenneException

Throws:
  `CayenneException`

Method Detail

### close

    public void close()
               throws CayenneException

  Description copied from interface: `ResultIterator`
  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`

### allRows

    public List<?> allRows()
                    throws CayenneException

  Description copied from interface: `ResultIterator`
  Returns all yet unread rows from ResultSet without closing it.

  Specified by:
    `allRows` in interface `ResultIterator`
  Throws:
    `CayenneException`
  Since:
    3.0

### hasNextRow

    public boolean hasNextRow()
                       throws CayenneException

  Description copied from interface: `ResultIterator`
  Returns true if there is at least one more record that can be read from the iterator.

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

### nextRow

    public Object nextRow()
                   throws CayenneException

  Description copied from interface: `ResultIterator`
  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.

  Specified by:
    `nextRow` in interface `ResultIterator`
  Throws:
    `CayenneException`
  Since:
    3.0

### skipRow

    public void skipRow()
                 throws CayenneException

  Specified by:
    `skipRow` in interface `ResultIterator`
  Throws:
    `CayenneException`
  Since:
    3.0

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

Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.