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
Abstract implementation of the
LifecycleListener
interface
which delegates events to a single method.- Author:
- Steve Kim, Abe White
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Constructor Details
-
AbstractLifecycleListener
public AbstractLifecycleListener()
-
-
Method Details
-
eventOccurred
Should be implemented to handle the specific lifecycle event. -
beforePersist
Description copied from interface:PersistListener
Invoked before an instance is persisted.- Specified by:
beforePersist
in interfacePersistListener
-
afterPersist
Description copied from interface:PersistListener
Invoked when an instance is persisted.- Specified by:
afterPersist
in interfacePersistListener
-
beforeClear
Description copied from interface:ClearListener
Invoked before state is cleared.- Specified by:
beforeClear
in interfaceClearListener
-
afterClear
Description copied from interface:ClearListener
Invoked after state is cleared.- Specified by:
afterClear
in interfaceClearListener
-
afterLoad
Description copied from interface:LoadListener
Invoked after state has been loaded into the instance.- Specified by:
afterLoad
in interfaceLoadListener
-
beforeDelete
Description copied from interface:DeleteListener
Invoked before the instance transferred to a deleted state.- Specified by:
beforeDelete
in interfaceDeleteListener
-
afterDelete
Description copied from interface:DeleteListener
Invoked after the instance transferred to a deleted state.- Specified by:
afterDelete
in interfaceDeleteListener
-
beforeStore
Description copied from interface:StoreListener
Invoked just prior to store.- Specified by:
beforeStore
in interfaceStoreListener
-
afterStore
Description copied from interface:StoreListener
Invoked just after store.- Specified by:
afterStore
in interfaceStoreListener
-
beforeDirty
Description copied from interface:DirtyListener
Invoked before the first change is applied.- Specified by:
beforeDirty
in interfaceDirtyListener
-
afterDirty
Description copied from interface:DirtyListener
Invoked after the first change is applied.- Specified by:
afterDirty
in interfaceDirtyListener
-
beforeDirtyFlushed
Description copied from interface:DirtyListener
Invoked before the first change is applied to a flushed instance.- Specified by:
beforeDirtyFlushed
in interfaceDirtyListener
-
afterDirtyFlushed
Description copied from interface:DirtyListener
Invoked after the first change is applied to a flushed instance.- Specified by:
afterDirtyFlushed
in interfaceDirtyListener
-
afterRefresh
Description copied from interface:LoadListener
Invoked after state has been refreshed.- Specified by:
afterRefresh
in interfaceLoadListener
-
beforeDetach
Description copied from interface:DetachListener
Invoked before the instance is detached.- Specified by:
beforeDetach
in interfaceDetachListener
-
afterDetach
Description copied from interface:DetachListener
Invoked after the instance has been detached.- Specified by:
afterDetach
in interfaceDetachListener
-
beforeAttach
Description copied from interface:AttachListener
Invoked before the instance is attached.- Specified by:
beforeAttach
in interfaceAttachListener
-
afterAttach
Description copied from interface:AttachListener
Invoked after the instance has been attached.- Specified by:
afterAttach
in interfaceAttachListener
-