Package org.apache.openjpa.event
Class AbstractLifecycleListener
- java.lang.Object
-
- 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 theLifecycleListenerinterface which delegates events to a single method.- Author:
- Steve Kim, Abe White
-
-
Constructor Summary
Constructors Constructor Description AbstractLifecycleListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAttach(LifecycleEvent event)Invoked after the instance has been attached.voidafterClear(LifecycleEvent event)Invoked after state is cleared.voidafterDelete(LifecycleEvent event)Invoked after the instance transferred to a deleted state.voidafterDetach(LifecycleEvent event)Invoked after the instance has been detached.voidafterDirty(LifecycleEvent event)Invoked after the first change is applied.voidafterDirtyFlushed(LifecycleEvent event)Invoked after the first change is applied to a flushed instance.voidafterLoad(LifecycleEvent event)Invoked after state has been loaded into the instance.voidafterPersist(LifecycleEvent event)Invoked when an instance is persisted.voidafterRefresh(LifecycleEvent event)Invoked after state has been refreshed.voidafterStore(LifecycleEvent event)Invoked just after store.voidbeforeAttach(LifecycleEvent event)Invoked before the instance is attached.voidbeforeClear(LifecycleEvent event)Invoked before state is cleared.voidbeforeDelete(LifecycleEvent event)Invoked before the instance transferred to a deleted state.voidbeforeDetach(LifecycleEvent event)Invoked before the instance is detached.voidbeforeDirty(LifecycleEvent event)Invoked before the first change is applied.voidbeforeDirtyFlushed(LifecycleEvent event)Invoked before the first change is applied to a flushed instance.voidbeforePersist(LifecycleEvent event)Invoked before an instance is persisted.voidbeforeStore(LifecycleEvent event)Invoked just prior to store.protected voideventOccurred(LifecycleEvent event)Should be implemented to handle the specific lifecycle event.
-
-
-
Method Detail
-
eventOccurred
protected void eventOccurred(LifecycleEvent event)
Should be implemented to handle the specific lifecycle event.
-
beforePersist
public void beforePersist(LifecycleEvent event)
Description copied from interface:PersistListenerInvoked before an instance is persisted.- Specified by:
beforePersistin interfacePersistListener
-
afterPersist
public void afterPersist(LifecycleEvent event)
Description copied from interface:PersistListenerInvoked when an instance is persisted.- Specified by:
afterPersistin interfacePersistListener
-
beforeClear
public void beforeClear(LifecycleEvent event)
Description copied from interface:ClearListenerInvoked before state is cleared.- Specified by:
beforeClearin interfaceClearListener
-
afterClear
public void afterClear(LifecycleEvent event)
Description copied from interface:ClearListenerInvoked after state is cleared.- Specified by:
afterClearin interfaceClearListener
-
afterLoad
public void afterLoad(LifecycleEvent event)
Description copied from interface:LoadListenerInvoked after state has been loaded into the instance.- Specified by:
afterLoadin interfaceLoadListener
-
beforeDelete
public void beforeDelete(LifecycleEvent event)
Description copied from interface:DeleteListenerInvoked before the instance transferred to a deleted state.- Specified by:
beforeDeletein interfaceDeleteListener
-
afterDelete
public void afterDelete(LifecycleEvent event)
Description copied from interface:DeleteListenerInvoked after the instance transferred to a deleted state.- Specified by:
afterDeletein interfaceDeleteListener
-
beforeStore
public void beforeStore(LifecycleEvent event)
Description copied from interface:StoreListenerInvoked just prior to store.- Specified by:
beforeStorein interfaceStoreListener
-
afterStore
public void afterStore(LifecycleEvent event)
Description copied from interface:StoreListenerInvoked just after store.- Specified by:
afterStorein interfaceStoreListener
-
beforeDirty
public void beforeDirty(LifecycleEvent event)
Description copied from interface:DirtyListenerInvoked before the first change is applied.- Specified by:
beforeDirtyin interfaceDirtyListener
-
afterDirty
public void afterDirty(LifecycleEvent event)
Description copied from interface:DirtyListenerInvoked after the first change is applied.- Specified by:
afterDirtyin interfaceDirtyListener
-
beforeDirtyFlushed
public void beforeDirtyFlushed(LifecycleEvent event)
Description copied from interface:DirtyListenerInvoked before the first change is applied to a flushed instance.- Specified by:
beforeDirtyFlushedin interfaceDirtyListener
-
afterDirtyFlushed
public void afterDirtyFlushed(LifecycleEvent event)
Description copied from interface:DirtyListenerInvoked after the first change is applied to a flushed instance.- Specified by:
afterDirtyFlushedin interfaceDirtyListener
-
afterRefresh
public void afterRefresh(LifecycleEvent event)
Description copied from interface:LoadListenerInvoked after state has been refreshed.- Specified by:
afterRefreshin interfaceLoadListener
-
beforeDetach
public void beforeDetach(LifecycleEvent event)
Description copied from interface:DetachListenerInvoked before the instance is detached.- Specified by:
beforeDetachin interfaceDetachListener
-
afterDetach
public void afterDetach(LifecycleEvent event)
Description copied from interface:DetachListenerInvoked after the instance has been detached.- Specified by:
afterDetachin interfaceDetachListener
-
beforeAttach
public void beforeAttach(LifecycleEvent event)
Description copied from interface:AttachListenerInvoked before the instance is attached.- Specified by:
beforeAttachin interfaceAttachListener
-
afterAttach
public void afterAttach(LifecycleEvent event)
Description copied from interface:AttachListenerInvoked after the instance has been attached.- Specified by:
afterAttachin interfaceAttachListener
-
-