org.apache.cayenne

## Class ResultBatchIterator<T>

- java.lang.Object
- - org.apache.cayenne.ResultBatchIterator<T>

- All Implemented Interfaces:
    AutoCloseable, Iterable<List<T>>, Iterator<List<T>>

      public class ResultBatchIterator<T>
      extends Object
      implements Iterable<List<T>>, Iterator<List<T>>, AutoCloseable

  Defines API of a batch iterator over the ResultIterator returned as a result of Select queries execution. Usually a ResultBatchIterator is supported by an open java.sql.ResultSet, therefore ResultBatchIterator must be explicitly closed when the user is done working with them.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultBatchIterator(ResultIterator<T> delegate, int size)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `int` | `getBatchSize()`
    `boolean` | `hasNext()`
    `Iterator<List<T>>` | `iterator()`
    `List<T>` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Constructor Detail

    - #### ResultBatchIterator

          public ResultBatchIterator(ResultIterator<T> delegate,
                                     int size)

  - ### Method Detail

    - #### iterator

          public Iterator<List<T>> iterator()

      Specified by:
        `iterator` in interface `Iterable<List<T>>`

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<List<T>>`

    - #### next

          public List<T> next()

      Specified by:
        `next` in interface `Iterator<List<T>>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<List<T>>`

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`

    - #### getBatchSize

          public int getBatchSize()

Copyright © 2001–2018 Apache Cayenne. All rights reserved.