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

Query-By-Example interface to retrieve objects.

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

Syntax

Visual Basic (Declaration)
Function Get ( _
	template As Object _
) As IObjectSet
C#
IObjectSet Get (
	Object template
)
Visual C++
IObjectSet^ Get (
	Object^ template
)

Parameters

template
System.Object
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.

 Copy imageCopy Code
Get()
creates an IObjectSet containing all objects in the
 Copy imageCopy Code
IObjectContainer
that match the passed template object.

Calling
 Copy imageCopy Code
Get(NULL)
returns all objects stored in the
 Copy imageCopy Code
IObjectContainer
.


Query IEvaluation
All 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
 Copy imageCopy Code
Collection
classes are evaluated for containment. Differences in
 Copy imageCopy Code
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 individually for classes .

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
 Copy imageCopy Code
Get()
can respond to the callback method objectOnActivate .

See Also

Why activation?
Using callbacks