org.apache.openjpa.event
Class AbstractLifecycleListener

java.lang.Object
  extended by org.apache.openjpa.event.AbstractLifecycleListener
All Implemented Interfaces:
AttachListener, ClearListener, DeleteListener, DetachListener, DirtyListener, LifecycleListener, LoadListener, PersistListener, StoreListener

public abstract class AbstractLifecycleListener
extends Object
implements LifecycleListener

Abstract implementation of the LifecycleListener interface which delegates events to a single method.

Author:
Steve Kim, Abe White

Constructor Summary
AbstractLifecycleListener()
           
 
Method Summary
 void afterClear(LifecycleEvent event)
          Invoked after state is cleared.
 void afterDelete(LifecycleEvent event)
          Invoked after the instance transferred to a deleted state.
 void afterDirty(LifecycleEvent event)
          Invoked after the first change is applied.
 void afterDirtyFlushed(LifecycleEvent event)
          Invoked after the first change is applied to a flushed instance.
 void afterLoad(LifecycleEvent event)
          Invoked after state has been loaded into the instance.
 void afterPersist(LifecycleEvent event)
          Invoked when an instance is persisted.
 void afterStore(LifecycleEvent event)
          Invoked just after store.
 void beforeClear(LifecycleEvent event)
          Invoked before state is cleared.
 void beforeDelete(LifecycleEvent event)
          Invoked before the instance transferred to a deleted state.
 void beforeDirty(LifecycleEvent event)
          Invoked before the first change is applied.
 void beforeDirtyFlushed(LifecycleEvent event)
          Invoked before the first change is applied to a flushed instance.
 void beforeStore(LifecycleEvent event)
          Invoked just prior to store.
protected  void eventOccurred(LifecycleEvent event)
          Should be implemented to handle the specific lifecycle event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.event.PersistListener
beforePersist
 
Methods inherited from interface org.apache.openjpa.event.LoadListener
afterRefresh
 
Methods inherited from interface org.apache.openjpa.event.DetachListener
afterDetach, beforeDetach
 
Methods inherited from interface org.apache.openjpa.event.AttachListener
afterAttach, beforeAttach
 

Constructor Detail

AbstractLifecycleListener

public AbstractLifecycleListener()
Method Detail

eventOccurred

protected void eventOccurred(LifecycleEvent event)
Should be implemented to handle the specific lifecycle event.


afterPersist

public void afterPersist(LifecycleEvent event)
Description copied from interface: PersistListener
Invoked when an instance is persisted.

Specified by:
afterPersist in interface PersistListener

beforeClear

public void beforeClear(LifecycleEvent event)
Description copied from interface: ClearListener
Invoked before state is cleared.

Specified by:
beforeClear in interface ClearListener

afterClear

public void afterClear(LifecycleEvent event)
Description copied from interface: ClearListener
Invoked after state is cleared.

Specified by:
afterClear in interface ClearListener

afterLoad

public void afterLoad(LifecycleEvent event)
Description copied from interface: LoadListener
Invoked after state has been loaded into the instance.

Specified by:
afterLoad in interface LoadListener

beforeDelete

public void beforeDelete(LifecycleEvent event)
Description copied from interface: DeleteListener
Invoked before the instance transferred to a deleted state.

Specified by:
beforeDelete in interface DeleteListener

afterDelete

public void afterDelete(LifecycleEvent event)
Description copied from interface: DeleteListener
Invoked after the instance transferred to a deleted state.

Specified by:
afterDelete in interface DeleteListener

beforeStore

public void beforeStore(LifecycleEvent event)
Description copied from interface: StoreListener
Invoked just prior to store.

Specified by:
beforeStore in interface StoreListener

afterStore

public void afterStore(LifecycleEvent event)
Description copied from interface: StoreListener
Invoked just after store.

Specified by:
afterStore in interface StoreListener

beforeDirty

public void beforeDirty(LifecycleEvent event)
Description copied from interface: DirtyListener
Invoked before the first change is applied.

Specified by:
beforeDirty in interface DirtyListener

afterDirty

public void afterDirty(LifecycleEvent event)
Description copied from interface: DirtyListener
Invoked after the first change is applied.

Specified by:
afterDirty in interface DirtyListener

beforeDirtyFlushed

public void beforeDirtyFlushed(LifecycleEvent event)
Description copied from interface: DirtyListener
Invoked before the first change is applied to a flushed instance.

Specified by:
beforeDirtyFlushed in interface DirtyListener

afterDirtyFlushed

public void afterDirtyFlushed(LifecycleEvent event)
Description copied from interface: DirtyListener
Invoked after the first change is applied to a flushed instance.

Specified by:
afterDirtyFlushed in interface DirtyListener


Copyright © 2006 Apache Software Foundation. All Rights Reserved.