Package org.apache.openjpa.event
Class AbstractTransactionListener
java.lang.Object
org.apache.openjpa.event.AbstractTransactionListener
- All Implemented Interfaces:
BeginTransactionListener
,EndTransactionListener
,FlushTransactionListener
,TransactionListener
Abstract implementation of the
TransactionListener
interface
that provides no-op implementations of all methods.- Since:
- 0.3.0
- Author:
- Abe White
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterBegin
(TransactionEvent event) Notification that a transaction has begun.void
afterCommit
(TransactionEvent event) Notification that a transaction has successfully committed.void
Notification that a transaction has successfully committed and the transaction is no longer active.void
afterFlush
(TransactionEvent event) Notification that a transaction has flushed all object changes.void
afterRollback
(TransactionEvent event) Notification that a transaction has been rolled back.void
Notification that a transaction has been rolled back and the transaction is no longer active.void
Notification that state transitions are complete.void
beforeCommit
(TransactionEvent event) Notification that the next flush is for the transaction commit.void
beforeFlush
(TransactionEvent event) Notification that a transaction is about to flush all object changes.protected void
eventOccurred
(TransactionEvent event) Catch-all for unhandled events.
-
Constructor Details
-
AbstractTransactionListener
public AbstractTransactionListener()
-
-
Method Details
-
eventOccurred
Catch-all for unhandled events. This method is called by all other event methods if you do not override them. Does nothing by default. -
afterBegin
Description copied from interface:BeginTransactionListener
Notification that a transaction has begun.- Specified by:
afterBegin
in interfaceBeginTransactionListener
- See Also:
-
beforeFlush
Description copied from interface:FlushTransactionListener
Notification that a transaction is about to flush all object changes.- Specified by:
beforeFlush
in interfaceFlushTransactionListener
- See Also:
-
afterFlush
Description copied from interface:FlushTransactionListener
Notification that a transaction has flushed all object changes.- Specified by:
afterFlush
in interfaceFlushTransactionListener
- See Also:
-
beforeCommit
Description copied from interface:EndTransactionListener
Notification that the next flush is for the transaction commit.- Specified by:
beforeCommit
in interfaceEndTransactionListener
- See Also:
-
afterCommit
Description copied from interface:EndTransactionListener
Notification that a transaction has successfully committed.- Specified by:
afterCommit
in interfaceEndTransactionListener
- See Also:
-
afterRollback
Description copied from interface:EndTransactionListener
Notification that a transaction has been rolled back.- Specified by:
afterRollback
in interfaceEndTransactionListener
- See Also:
-
afterStateTransitions
Description copied from interface:EndTransactionListener
Notification that state transitions are complete.- Specified by:
afterStateTransitions
in interfaceEndTransactionListener
- See Also:
-
afterCommitComplete
Description copied from interface:EndTransactionListener
Notification that a transaction has successfully committed and the transaction is no longer active.- Specified by:
afterCommitComplete
in interfaceEndTransactionListener
- See Also:
-
afterRollbackComplete
Description copied from interface:EndTransactionListener
Notification that a transaction has been rolled back and the transaction is no longer active.- Specified by:
afterRollbackComplete
in interfaceEndTransactionListener
- See Also:
-