Interface CallbackHandler
- All Known Implementing Classes:
ExecutionContextImpl.NullCallbackHandler
public interface CallbackHandler
CallBack handlers receive notification of events on persistent objects.
Handlers are responsible for invoking event listeners/callback methods on Callback or Listener implementations.
When a validation handler is set, the prePersist, preStore and preDelete callbacks will be routed through to this validation handler.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(Object listener, Class[] classes) Adds a new listener to this handler.voidclose()Clear any objects to release resources.default voidpostAttach(Object pc, Object detachedPC) Callback after the object is attached.default voidCallback after the fields of the object are cleared.default voidpostCreate(Object pc) Callback after the object has been created.default voidpostDelete(Object pc) Callback after the object is deleted.default voidpostDetach(Object pc, Object detachedPC) Callback after the object is detached.default voidCallback after the object is made dirty.default voidCallback after the fields of the object are loaded.default voidpostRefresh(Object pc) Callback after the fields of the object are refreshed.default voidCallback after the object is stored.default voidCallback before the object is attached.default voidCallback before the fields of the object are cleared.default voidCallback before the object is deleted.default voidCallback before the object is detached.default voidCallback before the object is made dirty.default voidprePersist(Object pc) Callback before the object is persisted (just before the lifecycle state change).default voidCallback before the object is stored.voidremoveListener(Object listener) Remove a listener for this handler.
-
Method Details
-
postCreate
Callback after the object has been created.- Parameters:
pc- The Object
-
prePersist
Callback before the object is persisted (just before the lifecycle state change).- Parameters:
pc- The Object
-
preStore
-
postStore
-
preClear
Callback before the fields of the object are cleared.- Parameters:
pc- The Object
-
postClear
Callback after the fields of the object are cleared.- Parameters:
pc- The Object
-
preDelete
Callback before the object is deleted.- Parameters:
pc- The Object
-
postDelete
Callback after the object is deleted.- Parameters:
pc- The Object
-
preDirty
Callback before the object is made dirty.- Parameters:
pc- The Object
-
postDirty
Callback after the object is made dirty.- Parameters:
pc- The Object
-
postLoad
Callback after the fields of the object are loaded.- Parameters:
pc- The Object
-
postRefresh
Callback after the fields of the object are refreshed.- Parameters:
pc- The Object
-
preDetach
Callback before the object is detached.- Parameters:
pc- The Object
-
postDetach
-
preAttach
Callback before the object is attached.- Parameters:
detachedPC- The Object
-
postAttach
-
addListener
-
removeListener
Remove a listener for this handler.- Parameters:
listener- the listener instance
-
close
void close()Clear any objects to release resources.
-