org.apache.openjpa.event
Class AbstractTransactionListener

java.lang.Object
  extended by org.apache.openjpa.event.AbstractTransactionListener
All Implemented Interfaces:
BeginTransactionListener, EndTransactionListener, FlushTransactionListener, TransactionListener

public abstract class AbstractTransactionListener
extends Object
implements TransactionListener

Abstract implementation of the TransactionListener interface that provides no-op implementations of all methods.

Since:
0.3.0
Author:
Abe White

Constructor Summary
AbstractTransactionListener()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTransactionListener

public AbstractTransactionListener()
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 interface BeginTransactionListener
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 interface FlushTransactionListener
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 interface FlushTransactionListener
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 interface EndTransactionListener
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 interface EndTransactionListener
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 interface EndTransactionListener
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 interface EndTransactionListener
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 interface EndTransactionListener
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 interface EndTransactionListener
See Also:
TransactionEvent.AFTER_ROLLBACK_COMPLETE


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.