ObjectContainer.set Method
newly stores objects or updates stored objects.
Parameters
-
obj
- the object to be stored or updated.
Remarks
newly stores objects or updates stored objects.
An object not yet stored in the
ObjectContainer
will be stored when it is passed to
set()
. An object already stored in the
ObjectContainer
will be updated.
Updates - will affect all simple type object members.
- links to object members that are already stored will be updated.
- new object members will be newly stored. The algorithm traverses down new members, as long as further new members are found.
- object members that are already stored will
not be updated themselves.
Every object member needs to be updated individually with a call to
set()
unless a deep
updateDepth or
updateDepth update depth was configured or cascaded updates were
cascadeOnUpdate or in
cascadeOnUpdate .
Examples: ../com/db4o/samples/update. Depending if the passed object is newly stored or updated, the callback method
objectOnNew or
objectOnUpdate is triggered.
objectOnUpdate might also be used for cascaded updates.
See Also
ObjectContainer Interface | com.db4o Namespace | set | updateDepth | updateDepth | cascadeOnUpdate | cascadeOnUpdate | Using callbacks