Package org.apache.cayenne.access
Interface OperationObserver
- All Superinterfaces:
OperationHints
- All Known Implementing Classes:
DefaultOperationObserver
,DoNothingOperationObserver
,IteratedSelectObserver
Defines a set of callback methods that allow
QueryEngine
to pass back query
results and notify caller about exceptions.-
Method Summary
Modifier and TypeMethodDescriptionvoid
nextBatchCount
(Query query, int[] resultCount) Callback method invoked after a batch update is executed.void
Callback method invoked after an updating query is executed.void
nextGeneratedRows
(Query query, ResultIterator<?> keys, List<ObjectId> idsToUpdate) Callback method invoked after each batch of generated values is read during an update.default void
nextGeneratedRows
(Query query, ResultIterator<?> keys, ObjectId idToUpdate) Deprecated.void
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
Callback method invoked for each processed ResultSet.void
nextRows
(Query q, ResultIterator<?> it) Callback method invoked for each opened ResultIterator.Methods inherited from interface org.apache.cayenne.access.OperationHints
isIteratedResult
-
Method Details
-
nextCount
Callback method invoked after an updating query is executed. -
nextBatchCount
Callback method invoked after a batch update is executed. -
nextRows
Callback method invoked for each processed ResultSet.- Since:
- 3.0
-
nextRows
Callback method invoked for each opened ResultIterator. If this observer requested results to be returned as a ResultIterator, this method is invoked instead ofnextRows(Query, List)
.- Since:
- 3.0
-
nextGeneratedRows
@Deprecated default void nextGeneratedRows(Query query, ResultIterator<?> keys, ObjectId idToUpdate) Deprecated.since 4.2, usenextGeneratedRows(Query, ResultIterator, List)
Callback method invoked after each batch of generated values is read during an update.- Since:
- 4.0
-
nextGeneratedRows
Callback method invoked after each batch of generated values is read during an update.- Since:
- 4.2
-
nextQueryException
Callback method invoked on exceptions that happen during an execution of a specific query. -
nextGlobalException
Callback method invoked on exceptions that are not tied to a specific query execution, such as JDBC connection exceptions, etc.
-
nextGeneratedRows(Query, ResultIterator, List)