Table of Contents

Interface IObjectLayer

Namespace
DevExpress.Xpo
Assembly
DevExpress.Xpo.v24.1.dll

The interface to which object access layers should conform.

public interface IObjectLayer : IObjectLayerProvider, IXPDictionaryProvider
Inherited Members

Properties

CanLoadCollectionObjects

When implemented by a class, indicates if an object layer can call the IObjectLayer.LoadCollectionObjects method to load collection properties.

bool CanLoadCollectionObjects { get; }

Property Value

bool

true if collections can be loaded via an object layer’s IObjectLayer.LoadCollectionObjects method call; otherwise, false.

Methods

CommitChanges(Session, ICollection, ICollection)

When implemented by a class, commits object changes made in a specified session.

void CommitChanges(Session session, ICollection fullListForDelete, ICollection completeListForSave)

Parameters

session Session

A Session with pending object changes.

fullListForDelete ICollection

A collection of persistent objects to be deleted.

completeListForSave ICollection

A collection of persistent objects to be saved.

CommitChangesAsync(Session, ICollection, ICollection, AsyncCommitCallback)

When implemented by a class, asynchronously commits object changes made in a specified session and notifies upon completion.

object CommitChangesAsync(Session session, ICollection fullListForDelete, ICollection completeListForSave, AsyncCommitCallback callback)

Parameters

session Session

A Session with pending object changes.

fullListForDelete ICollection

A collection of persistent objects to be deleted.

completeListForSave ICollection

A collection of persistent objects to be saved.

callback AsyncCommitCallback

An AsyncCommitCallback delegate to be called after the changes have been committed. Use the callback to store the exception information passed as a parameter, and use this information later, to raise the exception again, within the original thread. Do not raise exceptions or modify persistent objects within a callback.

Returns

object

An object identifying the current asynchronous operation, intended for internal use.

CreateObjectType(XPObjectType)

When implemented by a class, creates an XPObjectType record.

void CreateObjectType(XPObjectType objectType)

Parameters

objectType XPObjectType

An XPObjectType object specifying a valid persistent type.

GetObjectLayerWideObjectTypes()

When implemented by a class, returns a Dictionary<XPClassInfo,XPObjectType> specifying the correspondence of XPClassInfo objects to XPObjectType records.

Dictionary<XPClassInfo, XPObjectType> GetObjectLayerWideObjectTypes()

Returns

Dictionary<XPClassInfo, XPObjectType>

A Dictionary<XPClassInfo,XPObjectType>, providing a collection of complementary XPClassInfo-XPObjectType pairs.

GetObjectsByKey(Session, ObjectsByKeyQuery[])

When implemented by a class, returns persistent objects from a specified session using queries based on specified object types and key values.

ICollection[] GetObjectsByKey(Session session, ObjectsByKeyQuery[] queries)

Parameters

session Session

A Session that is used to retrieve persistent objects.

queries ObjectsByKeyQuery[]

An array of ObjectsByKeyQuery objects, containing data for queries that retrieve persistent objects by specified object types and key values.

Returns

ICollection[]

An array of persistent object collections retrieved for query data passed as the queries parameter.

GetStaticCache(XPClassInfo)

This member supports the internal infrastructure and is not intended to be used directly from your code.

IObjectMap GetStaticCache(XPClassInfo info)

Parameters

info XPClassInfo

Returns

IObjectMap

IsStaticType(XPClassInfo)

This member supports the internal infrastructure and is not intended to be used directly from your code.

bool IsStaticType(XPClassInfo type)

Parameters

type XPClassInfo

Returns

bool

LoadCollectionObjects(Session, XPMemberInfo, object)

When implemented by a class, loads a collection property using specified settings.

object[] LoadCollectionObjects(Session session, XPMemberInfo refProperty, object ownerObject)

Parameters

session Session

A Session that is used to load collection objects.

refProperty XPMemberInfo

The ownerObject‘s property that references a collection property.

ownerObject object

The object that owns the collection property.

Returns

object[]

An array of collection objects.

LoadObjects(Session, ObjectsQuery[])

When implemented by a class, loads persistent objects using specified settings.

ICollection[] LoadObjects(Session session, ObjectsQuery[] queries)

Parameters

session Session

A Session that is used to load persistent objects.

queries ObjectsQuery[]

An array of ObjectsQuery objects specifying queries that are executed to retrieve persistent objects.

Returns

ICollection[]

An array of object collections that correspond to the queries.

LoadObjectsAsync(Session, ObjectsQuery[], AsyncLoadObjectsCallback)

When implemented by a class, asynchronously loads persistent objects using specified settings and notifies upon completion.

object LoadObjectsAsync(Session session, ObjectsQuery[] queries, AsyncLoadObjectsCallback callback)

Parameters

session Session

A Session that is used to load persistent objects.

queries ObjectsQuery[]

An array of ObjectsQuery objects specifying queries that are executed to retrieve persistent objects.

callback AsyncLoadObjectsCallback

An AsyncLoadObjectsCallback delegate to be called after the objects have been loaded. Use the callback to store the exception information passed as a parameter, and use this information later, to raise the exception again, within the original thread. Do not raise exceptions or modify persistent objects within a callback.

Returns

object

An object identifying the current asynchronous operation, intended for internal use.

Purge()

When implemented by a class, removes all objects marked for deletion.

PurgeResult Purge()

Returns

PurgeResult

A PurgeResult object containing removal statistics (the number of objects processed, purged, etc.)

RegisterStaticTypes(params XPClassInfo[])

This member supports the internal infrastructure and is not intended to be used directly from your code.

void RegisterStaticTypes(params XPClassInfo[] types)

Parameters

types XPClassInfo[]

SelectData(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator)

When implemented by a class, retrieves object data from a session using specified query parameters.

List<object[]> SelectData(Session session, ObjectsQuery query, CriteriaOperatorCollection properties, CriteriaOperatorCollection groupProperties, CriteriaOperator groupCriteria)

Parameters

session Session

A Session that is used to retrieve persistent objects.

query ObjectsQuery

An ObjectsQuery object specifying a query that is executed to retrieve persistent objects.

properties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies object properties to be retrieved.

groupProperties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies the grouping properties.

groupCriteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which specifies the grouping criteria for the retrieved objects.

Returns

List<object[]>

A list whose elements are property values that correspond to the properties of objects retrieved from the session.

SelectDataAsync(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator, AsyncSelectDataCallback)

When implemented by a class, asynchronously retrieves object data from a session using specified query parameters and notifies upon completion.

object SelectDataAsync(Session session, ObjectsQuery query, CriteriaOperatorCollection properties, CriteriaOperatorCollection groupProperties, CriteriaOperator groupCriteria, AsyncSelectDataCallback callback)

Parameters

session Session

A Session that is used to retrieve persistent objects.

query ObjectsQuery

An ObjectsQuery object specifying a query that is executed to retrieve persistent objects.

properties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies object properties to be retrieved.

groupProperties CriteriaOperatorCollection

A DevExpress.Data.Filtering.CriteriaOperatorCollection object which specifies the grouping properties.

groupCriteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which specifies the grouping criteria for the retrieved objects.

callback AsyncSelectDataCallback

An AsyncLoadObjectsCallback delegate to be called after the object data have been retrieved. Use the callback to store the exception information passed as a parameter, and use this information later, to raise the exception again, within the original thread. Do not raise exceptions or modify persistent objects within a callback.

Returns

object

An object identifying the current asynchronous operation, intended for internal use.

SetObjectLayerWideObjectTypes(Dictionary<XPClassInfo, XPObjectType>)

When implemented by a class, designates a Dictionary<XPClassInfo,XPObjectType> specifying the correspondence of XPClassInfo objects to XPObjectType records.

void SetObjectLayerWideObjectTypes(Dictionary<XPClassInfo, XPObjectType> loadedTypes)

Parameters

loadedTypes Dictionary<XPClassInfo, XPObjectType>

A Dictionary<XPClassInfo,XPObjectType>, providing a collection of complementary XPClassInfo-XPObjectType pairs.