org.datanucleus.state
Interface CallbackHandler

All Known Implementing Classes:
JDOCallbackHandler

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.


Method Summary
 void addListener(java.lang.Object listener, java.lang.Class[] classes)
          Adds a new listener to this handler.
 void close()
          Clear any objects to release resources.
 void postAttach(java.lang.Object pc, java.lang.Object detachedPC)
          Callback after the object is attached.
 void postClear(java.lang.Object pc)
          Callback after the fields of the object are cleared.
 void postCreate(java.lang.Object pc)
          Callback after the object has been created.
 void postDelete(java.lang.Object pc)
          Callback after the object is deleted.
 void postDetach(java.lang.Object pc, java.lang.Object detachedPC)
          Callback after the object is detached.
 void postDirty(java.lang.Object pc)
          Callback after the object is made dirty.
 void postLoad(java.lang.Object pc)
          Callback after the fields of the object are loaded.
 void postRefresh(java.lang.Object pc)
          Callback after the fields of the object are refreshed.
 void postStore(java.lang.Object pc)
          Callback after the object is stored.
 void preAttach(java.lang.Object detachedPC)
          Callback before the object is attached.
 void preClear(java.lang.Object pc)
          Callback before the fields of the object are cleared.
 void preDelete(java.lang.Object pc)
          Callback before the object is deleted.
 void preDetach(java.lang.Object pc)
          Callback before the object is detached.
 void preDirty(java.lang.Object pc)
          Callback before the object is made dirty.
 void prePersist(java.lang.Object pc)
          Callback before the object is persisted (just before the lifecycle state change).
 void preStore(java.lang.Object pc)
          Callback before the object is stored.
 void removeListener(java.lang.Object listener)
          Remove a listener for this handler.
 

Method Detail

postCreate

void postCreate(java.lang.Object pc)
Callback after the object has been created.

Parameters:
pc - The Object

prePersist

void prePersist(java.lang.Object pc)
Callback before the object is persisted (just before the lifecycle state change).

Parameters:
pc - The Object

preStore

void preStore(java.lang.Object pc)
Callback before the object is stored.

Parameters:
pc - The Object

postStore

void postStore(java.lang.Object pc)
Callback after the object is stored.

Parameters:
pc - The Object

preClear

void preClear(java.lang.Object pc)
Callback before the fields of the object are cleared.

Parameters:
pc - The Object

postClear

void postClear(java.lang.Object pc)
Callback after the fields of the object are cleared.

Parameters:
pc - The Object

preDelete

void preDelete(java.lang.Object pc)
Callback before the object is deleted.

Parameters:
pc - The Object

postDelete

void postDelete(java.lang.Object pc)
Callback after the object is deleted.

Parameters:
pc - The Object

preDirty

void preDirty(java.lang.Object pc)
Callback before the object is made dirty.

Parameters:
pc - The Object

postDirty

void postDirty(java.lang.Object pc)
Callback after the object is made dirty.

Parameters:
pc - The Object

postLoad

void postLoad(java.lang.Object pc)
Callback after the fields of the object are loaded.

Parameters:
pc - The Object

postRefresh

void postRefresh(java.lang.Object pc)
Callback after the fields of the object are refreshed.

Parameters:
pc - The Object

preDetach

void preDetach(java.lang.Object pc)
Callback before the object is detached.

Parameters:
pc - The Object

postDetach

void postDetach(java.lang.Object pc,
                java.lang.Object detachedPC)
Callback after the object is detached.

Parameters:
pc - The Object
detachedPC - The detached object

preAttach

void preAttach(java.lang.Object detachedPC)
Callback before the object is attached.

Parameters:
detachedPC - The Object

postAttach

void postAttach(java.lang.Object pc,
                java.lang.Object detachedPC)
Callback after the object is attached.

Parameters:
pc - The attached Object
detachedPC - The detached object

addListener

void addListener(java.lang.Object listener,
                 java.lang.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(java.lang.Object listener)
Remove a listener for this handler.

Parameters:
listener - the listener instance

close

void close()
Clear any objects to release resources.



Copyright © 2011. All Rights Reserved.