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 java.lang.Object implements LifecycleListener
Abstract implementation of theLifecycleListener
interface 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 void
afterAttach(LifecycleEvent event)
Invoked after the instance has been attached.void
afterClear(LifecycleEvent event)
Invoked after state is cleared.void
afterDelete(LifecycleEvent event)
Invoked after the instance transferred to a deleted state.void
afterDetach(LifecycleEvent event)
Invoked after the instance has been detached.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
afterRefresh(LifecycleEvent event)
Invoked after state has been refreshed.void
afterStore(LifecycleEvent event)
Invoked just after store.void
beforeAttach(LifecycleEvent event)
Invoked before the instance is attached.void
beforeClear(LifecycleEvent event)
Invoked before state is cleared.void
beforeDelete(LifecycleEvent event)
Invoked before the instance transferred to a deleted state.void
beforeDetach(LifecycleEvent event)
Invoked before the instance is detached.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
beforePersist(LifecycleEvent event)
Invoked before an instance is persisted.void
beforeStore(LifecycleEvent event)
Invoked just prior to store.protected void
eventOccurred(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:PersistListener
Invoked before an instance is persisted.- Specified by:
beforePersist
in interfacePersistListener
-
afterPersist
public void afterPersist(LifecycleEvent event)
Description copied from interface:PersistListener
Invoked when an instance is persisted.- Specified by:
afterPersist
in interfacePersistListener
-
beforeClear
public void beforeClear(LifecycleEvent event)
Description copied from interface:ClearListener
Invoked before state is cleared.- Specified by:
beforeClear
in interfaceClearListener
-
afterClear
public void afterClear(LifecycleEvent event)
Description copied from interface:ClearListener
Invoked after state is cleared.- Specified by:
afterClear
in interfaceClearListener
-
afterLoad
public void afterLoad(LifecycleEvent event)
Description copied from interface:LoadListener
Invoked after state has been loaded into the instance.- Specified by:
afterLoad
in interfaceLoadListener
-
beforeDelete
public void beforeDelete(LifecycleEvent event)
Description copied from interface:DeleteListener
Invoked before the instance transferred to a deleted state.- Specified by:
beforeDelete
in interfaceDeleteListener
-
afterDelete
public void afterDelete(LifecycleEvent event)
Description copied from interface:DeleteListener
Invoked after the instance transferred to a deleted state.- Specified by:
afterDelete
in interfaceDeleteListener
-
beforeStore
public void beforeStore(LifecycleEvent event)
Description copied from interface:StoreListener
Invoked just prior to store.- Specified by:
beforeStore
in interfaceStoreListener
-
afterStore
public void afterStore(LifecycleEvent event)
Description copied from interface:StoreListener
Invoked just after store.- Specified by:
afterStore
in interfaceStoreListener
-
beforeDirty
public void beforeDirty(LifecycleEvent event)
Description copied from interface:DirtyListener
Invoked before the first change is applied.- Specified by:
beforeDirty
in interfaceDirtyListener
-
afterDirty
public void afterDirty(LifecycleEvent event)
Description copied from interface:DirtyListener
Invoked after the first change is applied.- Specified by:
afterDirty
in interfaceDirtyListener
-
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 interfaceDirtyListener
-
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 interfaceDirtyListener
-
afterRefresh
public void afterRefresh(LifecycleEvent event)
Description copied from interface:LoadListener
Invoked after state has been refreshed.- Specified by:
afterRefresh
in interfaceLoadListener
-
beforeDetach
public void beforeDetach(LifecycleEvent event)
Description copied from interface:DetachListener
Invoked before the instance is detached.- Specified by:
beforeDetach
in interfaceDetachListener
-
afterDetach
public void afterDetach(LifecycleEvent event)
Description copied from interface:DetachListener
Invoked after the instance has been detached.- Specified by:
afterDetach
in interfaceDetachListener
-
beforeAttach
public void beforeAttach(LifecycleEvent event)
Description copied from interface:AttachListener
Invoked before the instance is attached.- Specified by:
beforeAttach
in interfaceAttachListener
-
afterAttach
public void afterAttach(LifecycleEvent event)
Description copied from interface:AttachListener
Invoked after the instance has been attached.- Specified by:
afterAttach
in interfaceAttachListener
-
-