org.apache.cayenne.access.util

## Class DoNothingOperationObserver

- java.lang.Object
- - org.apache.cayenne.access.util.DoNothingOperationObserver

- All Implemented Interfaces:
    OperationHints, OperationObserver

      public class DoNothingOperationObserver
      extends Object
      implements OperationObserver

  A very simple observer that does nothing with provided data, and rethrows any reported exceptions. Can be used as a base superclass for custom observers.
  Since:
    4.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DoNothingOperationObserver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isIteratedResult()` Returns `true` to indicate that any results of a select operation should be returned as a ResultIterator.
    `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, ObjectId idToUpdate)` Callback method invoked after each batch of generated values is read during an update.
    `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` | `nextRows(Query query, List<?> dataRows)` Callback method invoked for each processed ResultSet.
    `void` | `nextRows(Query q, ResultIterator<?> it)` Callback method invoked for each opened ResultIterator.

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

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

- - ### Constructor Detail

    - #### DoNothingOperationObserver

          public DoNothingOperationObserver()

  - ### Method Detail

    - #### isIteratedResult

          public boolean isIteratedResult()

      Description copied from interface: `OperationHints`
      Returns `true` to indicate that any results of a select operation should be returned as a ResultIterator. `false` is returned when the results are expected as a list.
      Specified by:
        `isIteratedResult` in interface `OperationHints`

    - #### nextCount

          public void nextCount(Query query,
                                int resultCount)

      Description copied from interface: `OperationObserver`
      Callback method invoked after an updating query is executed.
      Specified by:
        `nextCount` in interface `OperationObserver`

    - #### nextBatchCount

          public void nextBatchCount(Query query,
                                     int[] resultCount)

      Description copied from interface: `OperationObserver`
      Callback method invoked after a batch update is executed.
      Specified by:
        `nextBatchCount` in interface `OperationObserver`

    - #### 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`

    - #### nextRows

          public void nextRows(Query q,
                               ResultIterator<?> it)

      Description copied from interface: `OperationObserver`
      Callback method invoked for each opened ResultIterator. If this observer requested results to be returned as a ResultIterator, this method is invoked instead of `OperationObserver.nextRows(Query, List)`.
      Specified by:
        `nextRows` in interface `OperationObserver`

    - #### nextGeneratedRows

          public void nextGeneratedRows(Query query,
                                        ResultIterator<?> keys,
                                        ObjectId idToUpdate)

      Description copied from interface: `OperationObserver`
      Callback method invoked after each batch of generated values is read during an update.
      Specified by:
        `nextGeneratedRows` in interface `OperationObserver`

    - #### nextQueryException

          public void nextQueryException(Query query,
                                         Exception ex)

      Description copied from interface: `OperationObserver`
      Callback method invoked on exceptions that happen during an execution of a specific query.
      Specified by:
        `nextQueryException` in interface `OperationObserver`

    - #### nextGlobalException

          public void nextGlobalException(Exception ex)

      Description copied from interface: `OperationObserver`
      Callback method invoked on exceptions that are not tied to a specific query execution, such as JDBC connection exceptions, etc.
      Specified by:
        `nextGlobalException` in interface `OperationObserver`

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