|
db4o v1.10 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
storage and query interface.
The ObjectContainer interface provides all methods
to store, retrieve and delete objects and to check or change object state.
close() closes the ObjectContainer.
commit() forces an instantaneous write of
all possibly cached objects to the storage medium.
| Method Summary | |
void |
activate(java.lang.Object object)
instantiates all members on a deactivated stored object. |
void |
activate(java.lang.Object object,
int depth)
activates all members on a stored object to the specified depth. |
void |
close()
closes the ObjectContainer and writes all cached data.
|
void |
commit()
writes all cached objects to the storage medium instantaneously. |
void |
deactivate(java.lang.Object object)
deactivates a stored object by setting all members to NULL.
|
void |
delete(java.lang.Object object)
deletes a stored object permanently. |
ObjectSet |
get(java.lang.Object template)
Query-By-Example interface to retrieve objects. |
boolean |
isActive(java.lang.Object object)
tests if an object is activated. |
boolean |
isStored(java.lang.Object object)
tests if an object is stored in the ObjectContainer.
|
void |
set(java.lang.Object object)
newly stores objects or updates stored objects. |
java.lang.String[] |
storedClasses()
returns a String array of the classnames of all stored classes. |
| Method Detail |
public void activate(java.lang.Object object)
activate(Object, depth) for further details.activate(object) calls activate(object,1)
internally.Object - the object to be activated.
public void activate(java.lang.Object object,
int depth)
DEACTIVATED state are modified.
Object members at the specified depth are
instantiated in DEACTIVATED state.
activate() calls on the same object have no effect.
Passing an object that is not stored in the ObjectContainer
has no effect.maximumActivationDepth() and
minimumActivationDepth() in the
ObjectClass interface.activate() triggers the callback method
objectOnActivate which can be used for cascaded activation.Object - the object to be activated.public void close()
ObjectContainer and writes all cached data.
ObjectContainer methods will result in
exceptions.public void commit()
public void deactivate(java.lang.Object object)
NULL.
ObjectContainer.deactivate() triggers the callback method
objectOnDeactivate.Object - the object to be deactivated.public void delete(java.lang.Object object)
ObjectContainer.
set() with the same object newly stores the object
to the ObjectContainer.delete() triggers the callback method
objectOnDelete which can be used for cascaded delete.object - the object to be deleted from the
ObjectContainer.public ObjectSet get(java.lang.Object template)
get() creates an
ObjectSet containing
all objects in the ObjectContainer that match the passed
template object.get(NULL) returns all objects stored in the
ObjectContainer.Collection classes are
evaluated for containment. Differences in length/size() are
ignored.
ObjectSet are instantiated
and activated to the preconfigured depth of 5. The
activation depth
may be configured
globally or
individually for classes.
get() can respond to the callback
method
objectOnActivate.template - object to be used as an example to find all matching objects.ObjectSet
of all objects found.public boolean isActive(java.lang.Object object)
isActive returns false if an object is not
stored within the ObjectContainer.object - to be testedtrue if the passed object is active.public boolean isStored(java.lang.Object object)
ObjectContainer.
true if the passed object is stored.public void set(java.lang.Object object)
ObjectContainer will be
stored when it is passed to set(). An object already stored
in the ObjectContainer will be updated.
set() unless a class-specific
update depth was configured.objectOnNew or
objectOnUpdate is triggered.
objectOnUpdate might be used for cascaded update.Object - the object to be stored or updated.ObjectClass.#updateDepth(),
public java.lang.String[] storedClasses()
String array of the classnames of all stored classes.
|
db4o v1.10 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||