Package org.datanucleus.api.jdo
Class JDOCallbackHandler
- java.lang.Object
-
- org.datanucleus.api.jdo.JDOCallbackHandler
-
- All Implemented Interfaces:
org.datanucleus.state.CallbackHandler
public class JDOCallbackHandler extends Object implements org.datanucleus.state.CallbackHandler
CallbackHandler implementation for JDO.
-
-
Constructor Summary
Constructors Constructor Description JDOCallbackHandler(org.datanucleus.ExecutionContext ec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(Object listener, Class[] classes)Adds a new listener to this handler.voidclose()Clear any objects to release resources.protected List<LifecycleListenerForClass>getListenersWorkingCopy()Accessor for the working copy of the listeners (in case any are added/removed in the callbacks).voidpostAttach(Object pc, Object detachedPC)Callback after the object is attached.voidpostClear(Object pc)Callback after the fields of the object are cleared.voidpostCreate(Object pc)Callback after the object has been created.voidpostDelete(Object pc)Callback after the object is deleted.voidpostDetach(Object pc, Object detachedPC)Callback after the object is detached.voidpostDirty(Object pc)Callback after the object is made dirty.voidpostLoad(Object pc)Callback after the fields of the object are loaded.voidpostRefresh(Object pc)Callback after the fields of the object are refreshed.voidpostStore(Object pc)Callback after the object is stored.voidpreAttach(Object pc)Callback before the object is attached.voidpreClear(Object pc)Callback before the fields of the object are cleared.voidpreDelete(Object pc)Callback before the object is deleted.voidpreDetach(Object pc)Callback before the object is detached.voidpreDirty(Object pc)Callback before the object is made dirty.voidprePersist(Object pc)Callback before the object is persisted (just before the lifecycle state change).voidpreStore(Object pc)Callback before the object is stored.voidremoveListener(Object listener)Remove a listener for this handler.
-
-
-
Method Detail
-
postCreate
public void postCreate(Object pc)
Callback after the object has been created.- Specified by:
postCreatein interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
prePersist
public void prePersist(Object pc)
Callback before the object is persisted (just before the lifecycle state change).- Specified by:
prePersistin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
preStore
public void preStore(Object pc)
Callback before the object is stored.- Specified by:
preStorein interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postStore
public void postStore(Object pc)
Callback after the object is stored.- Specified by:
postStorein interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
preClear
public void preClear(Object pc)
Callback before the fields of the object are cleared.- Specified by:
preClearin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postClear
public void postClear(Object pc)
Callback after the fields of the object are cleared.- Specified by:
postClearin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
preDelete
public void preDelete(Object pc)
Callback before the object is deleted.- Specified by:
preDeletein interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postDelete
public void postDelete(Object pc)
Callback after the object is deleted.- Specified by:
postDeletein interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
preDirty
public void preDirty(Object pc)
Callback before the object is made dirty.- Specified by:
preDirtyin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postDirty
public void postDirty(Object pc)
Callback after the object is made dirty.- Specified by:
postDirtyin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postLoad
public void postLoad(Object pc)
Callback after the fields of the object are loaded.- Specified by:
postLoadin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postRefresh
public void postRefresh(Object pc)
Callback after the fields of the object are refreshed.- Specified by:
postRefreshin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
preDetach
public void preDetach(Object pc)
Callback before the object is detached.- Specified by:
preDetachin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postDetach
public void postDetach(Object pc, Object detachedPC)
Callback after the object is detached.- Specified by:
postDetachin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The ObjectdetachedPC- The detached object
-
preAttach
public void preAttach(Object pc)
Callback before the object is attached.- Specified by:
preAttachin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The Object
-
postAttach
public void postAttach(Object pc, Object detachedPC)
Callback after the object is attached.- Specified by:
postAttachin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
pc- The attached ObjectdetachedPC- The detached object
-
addListener
public void addListener(Object listener, Class[] classes)
Adds a new listener to this handler.- Specified by:
addListenerin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
listener- the listener instanceclasses- the persistent classes which events are fired for the listener
-
removeListener
public void removeListener(Object listener)
Remove a listener for this handler.- Specified by:
removeListenerin interfaceorg.datanucleus.state.CallbackHandler- Parameters:
listener- the listener instance
-
close
public void close()
Clear any objects to release resources.- Specified by:
closein interfaceorg.datanucleus.state.CallbackHandler
-
getListenersWorkingCopy
protected List<LifecycleListenerForClass> getListenersWorkingCopy()
Accessor for the working copy of the listeners (in case any are added/removed in the callbacks).- Returns:
- The working copy
-
-