[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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

Namespace: Db4objects.Db4o
Assembly:   Db4objects.Db4o (in Db4objects.Db4o.dll)

Syntax

Visual Basic (Declaration)
Sub Activate ( _
	obj As Object, _
	depth As Integer _
)
C#
void Activate (
	Object obj,
	int depth
)
Visual C++
void Activate (
	Object^ obj, 
	int depth
)

Parameters

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

Remarks

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

See "Why activation" for an explanation why activation is necessary.

The activate method activates a graph of persistent objects in memory. Only deactivated objects in the graph will be touched: their fields will be loaded from the database. The activate methods starts from a root object and traverses all member objects to the depth specified by the depth parameter. The depth parameter is the distance in "field hops" (object.field.field) away from the root object. The nodes at 'depth' level away from the root (for a depth of 3: object.member.member) will be instantiated but deactivated, their fields will be null. The activation depth of individual classes can be overruled with the methods MaximumActivationDepth() and MinimumActivationDepth() in the ObjectClass interface .

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

See Also

Why activation?
Using callbacks