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 void
addListener(Object listener, Class[] classes)
Adds a new listener to this handler.void
close()
Clear any objects to release resources.protected Object
getListenerInstance(Class listenerCls)
void
postDelete(Object pc)
Callback after the object is deleted.void
postLoad(Object pc)
Callback after the fields of the object are loaded.void
postStore(Object pc)
Callback after the object is stored.void
preDelete(Object pc)
Callback before the object is deleted (after calling remove() but before the lifecycle state change).void
prePersist(Object pc)
Callback before the object is persisted (just before the lifecycle state change).void
preStore(Object pc)
Callback before the object is stored.void
removeListener(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:
prePersist
in interfaceorg.datanucleus.state.CallbackHandler
- Parameters:
pc
- The Object
-
preStore
public void preStore(Object pc)
Callback before the object is stored.- Specified by:
preStore
in interfaceorg.datanucleus.state.CallbackHandler
- Parameters:
pc
- The Object
-
postStore
public void postStore(Object pc)
Callback after the object is stored.- Specified by:
postStore
in 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:
preDelete
in interfaceorg.datanucleus.state.CallbackHandler
- Parameters:
pc
- The Object
-
postDelete
public void postDelete(Object pc)
Callback after the object is deleted.- Specified by:
postDelete
in 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:
postLoad
in 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:
addListener
in 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:
removeListener
in interfaceorg.datanucleus.state.CallbackHandler
- Parameters:
listener
- the listener instance
-
close
public void close()
Clear any objects to release resources.- Specified by:
close
in interfaceorg.datanucleus.state.CallbackHandler
-
getListenerInstance
protected Object getListenerInstance(Class listenerCls) throws InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
-
-