IteratedSelectObserver (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.access.util, class: IteratedSelectObserver

# Class IteratedSelectObserver

java.lang.Object
org.apache.cayenne.access.util.DefaultOperationObserver
org.apache.cayenne.access.util.IteratedSelectObserver

All Implemented Interfaces:
  `OperationHints, OperationObserver`

public class IteratedSelectObserver extends DefaultOperationObserver
OperationObserver that is used to track the execution of SelectQueries with results returned as ResultIterator.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ResultIterator`
  `resultIterator`

  ### Fields inherited from class DefaultOperationObserver

  `globalExceptions, queryExceptions`
  Modifier and Type
  Field
  Description
  `protected List<Throwable>`
  `globalExceptions`
  `protected Map<Query, Throwable>`
  `queryExceptions`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IteratedSelectObserver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResultIterator`
  `getResultIterator()`
  `boolean`
  `isIteratedResult()`
  Returns `false`.
  `void`
  `nextRows(Query query, List<?> dataRows)`
  Callback method invoked for each processed ResultSet.
  `void`
  `nextRows(Query q, ResultIterator it)`
  Closes ResultIterator without reading its data.

  ### Methods inherited from class DefaultOperationObserver

  `getGlobalExceptions, getQueryExceptions, hasExceptions, nextBatchCount, nextCount, nextGeneratedRows, nextGlobalException, nextQueryException, printExceptions`
  Modifier and Type
  Method
  Description
  `List<Throwable>`
  `getGlobalExceptions()`
  Returns a list of global exceptions that occured during data operation run.
  `Map<Query, Throwable>`
  `getQueryExceptions()`
  Returns a list of exceptions that occured during data operation run by query.
  `boolean`
  `hasExceptions()`
  Returns `true` if at least one exception was registered during query execution.
  `void`
  `nextBatchCount(Query query, int[] resultCount)`
  Callback method invoked after a batch update is executed.
  `void`
  `nextCount(Query query, int resultCount)`
  Callback method invoked after an updating query is executed.
  `void`
  `nextGeneratedRows(Query query, ResultIterator<?> keys, List<ObjectId> idsToUpdate)`
  Closes ResultIterator without reading its data.
  `void`
  `nextGlobalException(Exception ex)`
  Callback method invoked on exceptions that are not tied to a specific query execution, such as JDBC connection exceptions, etc.
  `void`
  `nextQueryException(Query query, Exception ex)`
  Callback method invoked on exceptions that happen during an execution of a specific query.
  `void`
  `printExceptions(PrintWriter out)`
  Prints the information about query and global exceptions.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### resultIterator

    protected ResultIterator resultIterator

- ## Constructor Details

  - ### IteratedSelectObserver

    public IteratedSelectObserver()

- ## Method Details

  - ### isIteratedResult

    public boolean isIteratedResult()
    Description copied from class: `DefaultOperationObserver`
    Returns `false`.
    Specified by:
      `isIteratedResult` in interface `OperationHints`
    Overrides:
      `isIteratedResult` in class `DefaultOperationObserver`

  - ### nextRows

    public void nextRows(Query query, List<?> dataRows)
    Description copied from interface: `OperationObserver`
    Callback method invoked for each processed ResultSet.
    Specified by:
      `nextRows` in interface `OperationObserver`
    Overrides:
      `nextRows` in class `DefaultOperationObserver`

  - ### nextRows

    public void nextRows(Query q, ResultIterator it)
    Description copied from class: `DefaultOperationObserver`
    Closes ResultIterator without reading its data. If you implement a custom subclass, only call super if closing the iterator is what you need.
    Specified by:
      `nextRows` in interface `OperationObserver`
    Overrides:
      `nextRows` in class `DefaultOperationObserver`

  - ### getResultIterator

    public ResultIterator getResultIterator()