Package org.apache.openjpa.event
Class AbstractTransactionListener
- java.lang.Object
-
- org.apache.openjpa.event.AbstractTransactionListener
-
- All Implemented Interfaces:
BeginTransactionListener
,EndTransactionListener
,FlushTransactionListener
,TransactionListener
public abstract class AbstractTransactionListener extends java.lang.Object implements TransactionListener
Abstract implementation of theTransactionListener
interface that provides no-op implementations of all methods.- Since:
- 0.3.0
- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description AbstractTransactionListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterBegin(TransactionEvent event)
Notification that a transaction has begun.void
afterCommit(TransactionEvent event)
Notification that a transaction has successfully committed.void
afterCommitComplete(TransactionEvent event)
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
afterRollbackComplete(TransactionEvent event)
Notification that a transaction has been rolled back and the transaction is no longer active.void
afterStateTransitions(TransactionEvent event)
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.
-
-
-
Method Detail
-
eventOccurred
protected void eventOccurred(TransactionEvent event)
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
public void afterBegin(TransactionEvent event)
Description copied from interface:BeginTransactionListener
Notification that a transaction has begun.- Specified by:
afterBegin
in interfaceBeginTransactionListener
- See Also:
TransactionEvent.AFTER_BEGIN
-
beforeFlush
public void beforeFlush(TransactionEvent event)
Description copied from interface:FlushTransactionListener
Notification that a transaction is about to flush all object changes.- Specified by:
beforeFlush
in interfaceFlushTransactionListener
- See Also:
TransactionEvent.BEFORE_FLUSH
-
afterFlush
public void afterFlush(TransactionEvent event)
Description copied from interface:FlushTransactionListener
Notification that a transaction has flushed all object changes.- Specified by:
afterFlush
in interfaceFlushTransactionListener
- See Also:
TransactionEvent.AFTER_FLUSH
-
beforeCommit
public void beforeCommit(TransactionEvent event)
Description copied from interface:EndTransactionListener
Notification that the next flush is for the transaction commit.- Specified by:
beforeCommit
in interfaceEndTransactionListener
- See Also:
TransactionEvent.BEFORE_COMMIT
-
afterCommit
public void afterCommit(TransactionEvent event)
Description copied from interface:EndTransactionListener
Notification that a transaction has successfully committed.- Specified by:
afterCommit
in interfaceEndTransactionListener
- See Also:
TransactionEvent.AFTER_COMMIT
-
afterRollback
public void afterRollback(TransactionEvent event)
Description copied from interface:EndTransactionListener
Notification that a transaction has been rolled back.- Specified by:
afterRollback
in interfaceEndTransactionListener
- See Also:
TransactionEvent.AFTER_ROLLBACK
-
afterStateTransitions
public void afterStateTransitions(TransactionEvent event)
Description copied from interface:EndTransactionListener
Notification that state transitions are complete.- Specified by:
afterStateTransitions
in interfaceEndTransactionListener
- See Also:
TransactionEvent.AFTER_STATE_TRANSITIONS
-
afterCommitComplete
public void afterCommitComplete(TransactionEvent event)
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:
TransactionEvent.AFTER_COMMIT_COMPLETE
-
afterRollbackComplete
public void afterRollbackComplete(TransactionEvent event)
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:
TransactionEvent.AFTER_ROLLBACK_COMPLETE
-
-