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 Object implements TransactionListener
Abstract implementation of theTransactionListenerinterface 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 voidafterBegin(TransactionEvent event)Notification that a transaction has begun.voidafterCommit(TransactionEvent event)Notification that a transaction has successfully committed.voidafterCommitComplete(TransactionEvent event)Notification that a transaction has successfully committed and the transaction is no longer active.voidafterFlush(TransactionEvent event)Notification that a transaction has flushed all object changes.voidafterRollback(TransactionEvent event)Notification that a transaction has been rolled back.voidafterRollbackComplete(TransactionEvent event)Notification that a transaction has been rolled back and the transaction is no longer active.voidafterStateTransitions(TransactionEvent event)Notification that state transitions are complete.voidbeforeCommit(TransactionEvent event)Notification that the next flush is for the transaction commit.voidbeforeFlush(TransactionEvent event)Notification that a transaction is about to flush all object changes.protected voideventOccurred(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:BeginTransactionListenerNotification that a transaction has begun.- Specified by:
afterBeginin interfaceBeginTransactionListener- See Also:
TransactionEvent.AFTER_BEGIN
-
beforeFlush
public void beforeFlush(TransactionEvent event)
Description copied from interface:FlushTransactionListenerNotification that a transaction is about to flush all object changes.- Specified by:
beforeFlushin interfaceFlushTransactionListener- See Also:
TransactionEvent.BEFORE_FLUSH
-
afterFlush
public void afterFlush(TransactionEvent event)
Description copied from interface:FlushTransactionListenerNotification that a transaction has flushed all object changes.- Specified by:
afterFlushin interfaceFlushTransactionListener- See Also:
TransactionEvent.AFTER_FLUSH
-
beforeCommit
public void beforeCommit(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that the next flush is for the transaction commit.- Specified by:
beforeCommitin interfaceEndTransactionListener- See Also:
TransactionEvent.BEFORE_COMMIT
-
afterCommit
public void afterCommit(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that a transaction has successfully committed.- Specified by:
afterCommitin interfaceEndTransactionListener- See Also:
TransactionEvent.AFTER_COMMIT
-
afterRollback
public void afterRollback(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that a transaction has been rolled back.- Specified by:
afterRollbackin interfaceEndTransactionListener- See Also:
TransactionEvent.AFTER_ROLLBACK
-
afterStateTransitions
public void afterStateTransitions(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that state transitions are complete.- Specified by:
afterStateTransitionsin interfaceEndTransactionListener- See Also:
TransactionEvent.AFTER_STATE_TRANSITIONS
-
afterCommitComplete
public void afterCommitComplete(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that a transaction has successfully committed and the transaction is no longer active.- Specified by:
afterCommitCompletein interfaceEndTransactionListener- See Also:
TransactionEvent.AFTER_COMMIT_COMPLETE
-
afterRollbackComplete
public void afterRollbackComplete(TransactionEvent event)
Description copied from interface:EndTransactionListenerNotification that a transaction has been rolled back and the transaction is no longer active.- Specified by:
afterRollbackCompletein interfaceEndTransactionListener- See Also:
TransactionEvent.AFTER_ROLLBACK_COMPLETE
-
-