IObjectContainer Interface

Summary

The interface to a db4o database, stand-alone or client/server.
graph BT Type-.->Interface0["IDisposable"] Type-.->Interface1["ISodaQueryFactory"] click Interface1 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Query/ISodaQueryFactory" Type["IObjectContainer"] class Type type-node Implementing0["LocalObjectContainer"]-.->Type click Implementing0 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/LocalObjectContainer" Implementing1["IInternalObjectContainer"]-.->Type click Implementing1 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/IInternalObjectContainer" Implementing2["IExtClient"]-.->Type click Implementing2 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Ext/IExtClient" Implementing3["IoAdaptedObjectContainer"]-.->Type click Implementing3 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/IoAdaptedObjectContainer" Implementing4["IExtObjectContainer"]-.->Type click Implementing4 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Ext/IExtObjectContainer" Implementing5["ObjectContainerSession"]-.->Type click Implementing5 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/ObjectContainerSession" Implementing6["ExternalObjectContainer"]-.->Type click Implementing6 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/ExternalObjectContainer" Implementing7["TransportObjectContainer"]-.->Type click Implementing7 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/TransportObjectContainer" Implementing8["ObjectContainerBase"]-.->Type click Implementing8 "/db4o-gpl-doc/output/api/Db4objects.Db4o.Internal/ObjectContainerBase" Implementing9["IEmbeddedObjectContainer"]-.->Type click Implementing9 "/db4o-gpl-doc/output/api/Db4objects.Db4o/IEmbeddedObjectContainer"

Syntax

public interface IObjectContainer : IDisposable, ISodaQueryFactory

Remarks

The interface to a db4o database, stand-alone or client/server.

The IObjectContainer interface provides methods to store, query and delete objects and to commit and rollback transactions.

An IObjectContainer can either represent a stand-alone database or a connection to a Db4objects.Db4o.Db4o.OpenServer .

An object container also represents a transaction. All work with db4o always is transactional. Both Db4objects.Db4o.IObjectContainer.Commit and Db4objects.Db4o.IObjectContainer.Rollback start a new transaction immediately. For working against the same database with multiple transactions, open a new object container with Db4objects.Db4o.IObjectContainer.Ext.Db4objects.Db4o.Ext.IExtObjectContainer.OpenSession

Methods

Name Value Summary
Activate(Object, int) void
Activates all members on a stored object to the specified depth.
Close() bool
Closes this object container.
Commit() void
Commits the running transaction.
Deactivate(Object, int) void
Deactivates a stored object by setting all members to null.
Delete(Object) void
Deletes a stored object permanently from the database.
Ext() IExtObjectContainer
Returns an ObjectContainer with extended functionality.
Query() IQuery
Creates a new SODA Db4objects.Db4o.Query.IQuery , the low level db4o query api.

Prefer LINQ over SODA, unless you need a specific SODA featuere

Query(Predicate, IComparer) IObjectSet
Native Query Interface.
Query(Predicate, IQueryComparator) IObjectSet
Native Query Interface.
Query(Predicate) IObjectSet
Native Query Interface.
Query(Type) IObjectSet
Queries for all instances of a class.
Query<ElementType>(Type) IList<ElementType>
Queries for all instances of the given type
Query<Extent>() IList<Extent>
Queries for all instances of the given generic argument
Query<Extent>(IComparer<Extent>) IList<Extent>
Queries for all instances of the given type sorting with the specified comparer.
Query<Extent>(Predicate<Extent>, Comparison<Extent>) IList<Extent>
Native Query Interface.
Query<Extent>(Predicate<Extent>, IComparer<Extent>) IList<Extent>
Native Query Interface.
Query<Extent>(Predicate<Extent>) IList<Extent>
Native Query Interface.
QueryByExample(Object) IObjectSet
Query-By-Example interface to retrieve objects.
Rollback() void
Rolls back the running transaction.
Store(Object) void
Stores objects or updates stored objects..

See Also

  • Db4objects.Db4o.Ext.IExtObjectContainer