IObjectContainer.

Activate(Object, int) Method

Summary

Activates all members on a stored object to the specified depth.
Assembly
Db4objects.Db4o-2010.dll
Namespace
Db4objects.Db4o
Containing Type
IObjectContainer

Syntax

void Activate(Object obj, int depth)

Remarks

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

See Db4objects.Db4o.Config.ICommonConfiguration.ActivationDepth for an explanation why activation is necessary.

Calling this 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. When called it starts from the given object, traverses all member objects and activates them up to the given depth. 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 not populated with data. Its fields will be null. The activation depth of individual classes can be overruled with the methods Db4objects.Db4o.Config.IObjectClass.MaximumActivationDepth(System.Int32) and Db4objects.Db4o.Config.IObjectClass.MinimumActivationDepth(System.Int32) in the Db4objects.Db4o.Config.IObjectClass-interface.

Parameters

Name Type Description
obj Object the object to be activated.
depth int the member Db4objects.Db4o.Config.IConfiguration.ActivationDepth(System.Int32) to which activate is to cascade.

Return Value

Type Description
void

See Also

  • Db4objects.Db4o.Config.ICommonConfiguration.ActivationDepth
  • Db4objects.Db4o.Ext.IObjectCallbacks