db4o v1.10

com.db4o
Interface ObjectCallbacks


public interface ObjectCallbacks

callback methods.

This interface only serves as a lists of all available callback methods. Every method is called individually, independant of implementing this interface.

Using callbacks
Simply implement one or more of the listed methods in your application classes to respond to activation, deactivation, delete, new or update.

Callback methods are typically used for:
- cascaded delete
- cascaded update
- cascaded activation
- restoring transient members on instantiation

Callback methods follow the regular Java calling conventions. Methods in superclasses need to be called explicitely.

All method calls are implemented to occur only once, upon one event. You can however implement infinite loops by constructs like "child updates parent from objectOnUpdate, parent updates child from objectOnUpdate".


Method Summary
 void objectOnActivate(ObjectContainer container)
          called upon activation of an object.
 void objectOnDeactivate(ObjectContainer container)
          called upon deactivation of an object.
 void objectOnDelete(ObjectContainer container)
          called after an object was deleted.
 void objectOnNew(ObjectContainer container)
          called after a new object was stored.
 void objectOnUpdate(ObjectContainer container)
          called after an object was updated.
 

Method Detail

objectOnActivate

public void objectOnActivate(ObjectContainer container)
called upon activation of an object.
Parameters:
container - the ObjectContainer the object is stored in.

objectOnDeactivate

public void objectOnDeactivate(ObjectContainer container)
called upon deactivation of an object.
Parameters:
container - the ObjectContainer the object is stored in.

objectOnDelete

public void objectOnDelete(ObjectContainer container)
called after an object was deleted.
Parameters:
container - the ObjectContainer the object was stored in.

objectOnNew

public void objectOnNew(ObjectContainer container)
called after a new object was stored.
Parameters:
container - the ObjectContainer the object is stored to.

objectOnUpdate

public void objectOnUpdate(ObjectContainer container)
called after an object was updated.
Parameters:
container - the ObjectContainer the object is stored in.

db4o v1.10