Package org.datanucleus.api.jpa
Class JPACallbackHandler
- java.lang.Object
- 
- org.datanucleus.api.jpa.JPACallbackHandler
 
- 
- All Implemented Interfaces:
- org.datanucleus.state.CallbackHandler
 
 public class JPACallbackHandler extends Object implements org.datanucleus.state.CallbackHandler CallbackHandler implementation for JPA.
- 
- 
Constructor SummaryConstructors Constructor Description JPACallbackHandler(org.datanucleus.ExecutionContext ec)
 - 
Method SummaryAll 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 ObjectgetListenerInstance(Class listenerCls)voidpostDelete(Object pc)Callback after the object is deleted.voidpostLoad(Object pc)Callback after the fields of the object are loaded.voidpostStore(Object pc)Callback after the object is stored.voidpreDelete(Object pc)Callback before the object is deleted (after calling remove() but before the lifecycle state change).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- 
prePersistpublic void prePersist(Object pc) Callback before the object is persisted (just before the lifecycle state change).- Specified by:
- prePersistin interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
preStorepublic void preStore(Object pc) Callback before the object is stored.- Specified by:
- preStorein interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
postStorepublic void postStore(Object pc) Callback after the object is stored.- Specified by:
- postStorein interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
preDeletepublic void preDelete(Object pc) Callback before the object is deleted (after calling remove() but before the lifecycle state change).- Specified by:
- preDeletein interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
postDeletepublic void postDelete(Object pc) Callback after the object is deleted.- Specified by:
- postDeletein interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
postLoadpublic void postLoad(Object pc) Callback after the fields of the object are loaded.- Specified by:
- postLoadin interface- org.datanucleus.state.CallbackHandler
- Parameters:
- pc- The Object
 
 - 
addListenerpublic void addListener(Object listener, Class[] classes) Adds a new listener to this handler.- Specified by:
- addListenerin interface- org.datanucleus.state.CallbackHandler
- Parameters:
- listener- the listener instance.
- classes- this parameter is ignored in this implementation
 
 - 
removeListenerpublic void removeListener(Object listener) Remove a listener for this handler.- Specified by:
- removeListenerin interface- org.datanucleus.state.CallbackHandler
- Parameters:
- listener- the listener instance
 
 - 
closepublic void close() Clear any objects to release resources.- Specified by:
- closein interface- org.datanucleus.state.CallbackHandler
 
 - 
getListenerInstanceprotected Object getListenerInstance(Class listenerCls) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException 
 
- 
 
-