IObjectContainer.Get Method
Query-By-Example interface to retrieve objects.
Parameters
-
template
- object to be used as an example to find all matching objects.
Return Value
IObjectSet containing all found objects.
Remarks
Query-By-Example interface to retrieve objects.
Get()
creates an
IObjectSet containing all objects in the
IObjectContainer
that match the passed template object.
Calling
Get(NULL)
returns all objects stored in the
IObjectContainer
.
Query IEvaluationAll non-null members of the template object are compared against all stored objects of the same class. Primitive type members are ignored if they are 0 or false respectively.
Arrays and all supported
Collection
classes are evaluated for containment. Differences in
length/Size()
are ignored.
Consult the documentation of the IConfiguration package to configure class-specific behaviour.
Returned Objects The objects returned in the
IObjectSet are instantiated and activated to the preconfigured depth of 5. The
activation depth may be configured
globally or
ObjectClass .
db4o keeps track of all instantiatied objects. Queries will return references to these objects instead of instantiating them a second time.
Objects newly activated by
Get()
can respond to the callback method
ObjectOnActivate .
See Also
IObjectContainer Interface | Db4objects.Db4o Namespace | Why activation? | ObjectCallbacks