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 Type
    Method
    Description
    void
    addListener(Object listener, Class[] classes)
    Adds a new listener to this handler.
    void
    Clear any objects to release resources.
    default void
    postAttach(Object pc, Object detachedPC)
    Callback after the object is attached.
    default void
    Callback after the fields of the object are cleared.
    default void
    Callback after the object has been created.
    default void
    Callback after the object is deleted.
    default void
    postDetach(Object pc, Object detachedPC)
    Callback after the object is detached.
    default void
    Callback after the object is made dirty.
    default void
    Callback after the fields of the object are loaded.
    default void
    Callback after the fields of the object are refreshed.
    default void
    Callback after the object is stored.
    default void
    preAttach(Object detachedPC)
    Callback before the object is attached.
    default void
    Callback before the fields of the object are cleared.
    default void
    Callback before the object is deleted.
    default void
    Callback before the object is detached.
    default void
    Callback before the object is made dirty.
    default void
    Callback before the object is persisted (just before the lifecycle state change).
    default void
    Callback before the object is stored.
    void
    Remove a listener for this handler.
  • Method Details

    • postCreate

      default void postCreate(Object pc)
      Callback after the object has been created.
      Parameters:
      pc - The Object
    • prePersist

      default void prePersist(Object pc)
      Callback before the object is persisted (just before the lifecycle state change).
      Parameters:
      pc - The Object
    • preStore

      default void preStore(Object pc)
      Callback before the object is stored.
      Parameters:
      pc - The Object
    • postStore

      default void postStore(Object pc)
      Callback after the object is stored.
      Parameters:
      pc - The Object
    • preClear

      default void preClear(Object pc)
      Callback before the fields of the object are cleared.
      Parameters:
      pc - The Object
    • postClear

      default void postClear(Object pc)
      Callback after the fields of the object are cleared.
      Parameters:
      pc - The Object
    • preDelete

      default void preDelete(Object pc)
      Callback before the object is deleted.
      Parameters:
      pc - The Object
    • postDelete

      default void postDelete(Object pc)
      Callback after the object is deleted.
      Parameters:
      pc - The Object
    • preDirty

      default void preDirty(Object pc)
      Callback before the object is made dirty.
      Parameters:
      pc - The Object
    • postDirty

      default void postDirty(Object pc)
      Callback after the object is made dirty.
      Parameters:
      pc - The Object
    • postLoad

      default void postLoad(Object pc)
      Callback after the fields of the object are loaded.
      Parameters:
      pc - The Object
    • postRefresh

      default void postRefresh(Object pc)
      Callback after the fields of the object are refreshed.
      Parameters:
      pc - The Object
    • preDetach

      default void preDetach(Object pc)
      Callback before the object is detached.
      Parameters:
      pc - The Object
    • postDetach

      default void postDetach(Object pc, Object detachedPC)
      Callback after the object is detached.
      Parameters:
      pc - The Object
      detachedPC - The detached object
    • preAttach

      default void preAttach(Object detachedPC)
      Callback before the object is attached.
      Parameters:
      detachedPC - The Object
    • postAttach

      default void postAttach(Object pc, Object detachedPC)
      Callback after the object is attached.
      Parameters:
      pc - The attached Object
      detachedPC - The detached object
    • addListener

      void addListener(Object listener, Class[] classes)
      Adds a new listener to this handler.
      Parameters:
      listener - the listener instance
      classes - the persistent classes which events are fired for the listener
    • removeListener

      void removeListener(Object listener)
      Remove a listener for this handler.
      Parameters:
      listener - the listener instance
    • close

      void close()
      Clear any objects to release resources.