public class JPACallbackHandler extends Object implements org.datanucleus.state.CallbackHandler
Constructor and Description |
---|
JPACallbackHandler(org.datanucleus.PersistenceNucleusContext nucleusCtx) |
Modifier and Type | Method and 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.
|
void |
setBeanValidationHandler(org.datanucleus.BeanValidationHandler handler) |
public JPACallbackHandler(org.datanucleus.PersistenceNucleusContext nucleusCtx)
public void setBeanValidationHandler(org.datanucleus.BeanValidationHandler handler)
setBeanValidationHandler
in interface org.datanucleus.state.CallbackHandler
public void prePersist(Object pc)
prePersist
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void preStore(Object pc)
preStore
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void postStore(Object pc)
postStore
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void preDelete(Object pc)
preDelete
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void postDelete(Object pc)
postDelete
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void postLoad(Object pc)
postLoad
in interface org.datanucleus.state.CallbackHandler
pc
- The Objectpublic void addListener(Object listener, Class[] classes)
addListener
in interface org.datanucleus.state.CallbackHandler
listener
- the listener instance.classes
- this parameter is ignored in this implementationpublic void removeListener(Object listener)
removeListener
in interface org.datanucleus.state.CallbackHandler
listener
- the listener instancepublic void close()
close
in interface org.datanucleus.state.CallbackHandler
protected Object getListenerInstance(Class listenerCls) throws InstantiationException, IllegalAccessException
Copyright © 2020. All rights reserved.