Package org.datanucleus.api.jakarta
Class JakartaCallbackHandler
- java.lang.Object
-
- org.datanucleus.api.jakarta.JakartaCallbackHandler
-
- All Implemented Interfaces:
org.datanucleus.state.CallbackHandler
public class JakartaCallbackHandler extends Object implements org.datanucleus.state.CallbackHandler
CallbackHandler implementation for Jakarta Persistence.
-
-
Constructor Summary
Constructors Constructor Description JakartaCallbackHandler(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 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
-
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
-
preDelete
public void preDelete(Object pc)
Callback before the object is deleted (after calling remove() but before the lifecycle state change).- 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
-
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
-
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 instance.classes- this parameter is ignored in this implementation
-
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
-
getListenerInstance
protected Object getListenerInstance(Class listenerCls) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
-
-