|
db4o 6.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectCallbacks
callback methods.
Examples: ../com/db4o/samples/callbacks.
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
do tasks before activation, deactivation, delete, new or update, to cancel the
action about to be performed and to respond to the performed task.
Callback methods are typically used for:
- cascaded delete
- cascaded update
- cascaded activation
- restoring transient members on instantiation
Callback methods follow regular calling conventions. Methods in superclasses
need to be called explicitely.
All method calls are implemented to occur only once, upon one event.
Method Summary | |
---|---|
boolean |
objectCanActivate(ObjectContainer container)
called before an Object is activated. |
boolean |
objectCanDeactivate(ObjectContainer container)
called before an Object is deactivated. |
boolean |
objectCanDelete(ObjectContainer container)
called before an Object is deleted. |
boolean |
objectCanNew(ObjectContainer container)
called before an Object is stored the first time. |
boolean |
objectCanUpdate(ObjectContainer container)
called before a persisted Object is updated. |
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 |
---|
boolean objectCanActivate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.
boolean objectCanDeactivate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.
boolean objectCanDelete(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.
boolean objectCanNew(ObjectContainer container)
container
- the ObjectContainer
is about to be stored to.
boolean objectCanUpdate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.
void objectOnActivate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.void objectOnDeactivate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.void objectOnDelete(ObjectContainer container)
container
- the ObjectContainer
the object was stored in.void objectOnNew(ObjectContainer container)
container
- the ObjectContainer
the object is stored to.void objectOnUpdate(ObjectContainer container)
container
- the ObjectContainer
the object is stored in.
|
db4o 6.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |