org.apache.cayenne.access
Interface OperationObserver

All Superinterfaces:
OperationHints
All Known Implementing Classes:
ContextCommitObserver, DataDomainLegacyQueryAction, DefaultOperationObserver, IteratedSelectObserver, QueryResult, SelectObserver

public interface OperationObserver
extends OperationHints

Defines a set of callback methods that allow QueryEngine to pass back query results and notify caller about exceptions.

Author:
Andrei Adamchik
See Also:
QueryEngine

Method Summary
 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 nextDataRows(Query query, java.util.List dataRows)
          Callback method invoked for each processed ResultSet.
 void nextDataRows(Query q, ResultIterator it)
          Callback method invoked for each opened ResultIterator.
 void nextGeneratedDataRows(Query query, ResultIterator keysIterator)
          Callback method invoked after each batch of generated values is read durring an update.
 void nextGlobalException(java.lang.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, java.lang.Exception ex)
          Callback method invoked on exceptions that happen during an execution of a specific query.
 
Methods inherited from interface org.apache.cayenne.access.OperationHints
getLoggingLevel, isIteratedResult
 

Method Detail

nextCount

void nextCount(Query query,
               int resultCount)
Callback method invoked after an updating query is executed.


nextBatchCount

void nextBatchCount(Query query,
                    int[] resultCount)
Callback method invoked after a batch update is executed.


nextDataRows

void nextDataRows(Query query,
                  java.util.List dataRows)
Callback method invoked for each processed ResultSet.


nextDataRows

void nextDataRows(Query q,
                  ResultIterator it)
Callback method invoked for each opened ResultIterator. If this observer requested results to be returned as a ResultIterator, this method is invoked instead of "nextDataRows(Query,List)". OperationObserver is responsible for closing the ResultIterators passed via this method.


nextGeneratedDataRows

void nextGeneratedDataRows(Query query,
                           ResultIterator keysIterator)
Callback method invoked after each batch of generated values is read durring an update.

Since:
1.2

nextQueryException

void nextQueryException(Query query,
                        java.lang.Exception ex)
Callback method invoked on exceptions that happen during an execution of a specific query.


nextGlobalException

void nextGlobalException(java.lang.Exception ex)
Callback method invoked on exceptions that are not tied to a specific query execution, such as JDBC connection exceptions, etc.



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