db4o

ObjectContainer.activate Method 

activates all members on a stored object to the specified depth.

[Visual Basic]
Sub activate( _ 
   ByVal obj As Object, _ 
   ByVal depth As Integer _ 
)
[C#]
void activate(
   object obj,
   int depth
);
[C++]
void activate(
   Object* obj,
   int depth
);
[JScript]
function activate(
   Object obj,
   int depth
);

Parameters

obj
the object to be activated.
depth
the member depth to which activate is to cascade.

Remarks

activates all members on a stored object to the specified depth.

Examples: ../com/db4o/samples/activate.

This method serves to traverse the graph of persistent objects. All members of an object can be activated in turn with subsequent calls.

Only objects in

DEACTIVATED
state are modified.
Object
members at the specified depth are instantiated in
DEACTIVATED
state.

Duplicate
activate()
calls on the same object have no effect. Passing an object that is not stored in the
ObjectContainer
            
has no effect.

The activation depth of individual classes can be overruled with the methods maximumActivationDepth() and minimumActivationDepth() in the ObjectClass interface .

A successful
activate()
triggers the callback method objectOnActivate which can be used for cascaded activation.

See Also

ObjectContainer Interface | com.db4o Namespace | Why activation? | Using callbacks