Skip to main content
.NET 6.0+

SessionObjectLayer Members

An object access layer that saves and loads persistent objects via a parent Session or UnitOfWork.

Constructors

Name Description
SessionObjectLayer(Session, Boolean, IGenericSecurityRule, ISecurityRuleProvider, Object) Reserved for future use.
SessionObjectLayer(Session, Boolean) Initializes a new instance of the SessionObjectLayer class with a specified parent session and the SessionObjectLayer.ThroughCommitMode field value.
SessionObjectLayer(Session) Initializes a new instance of the SessionObjectLayer class with a specified parent session.

Fields

Name Description
ParentSession Specifies a Session object which the current object layer uses to save and load objects.
ThroughCommitMode Indicates if the SessionObjectLayer.CommitChanges method call automatically commits changes in a parent session to properly update key fields and fields with enabled optimistic locking (decorated with the KeyAttribute or OptimisticLockingAttribute) in a nested session. To assign the ThroughCommitMode field, use the corresponding SessionObjectLayer overloaded constructor.

Properties

Name Description
AutoCreateOption Returns an AutoCreateOption value associated with the current object layer.
CanLoadCollectionObjects Indicates if an object layer can call the SessionObjectLayer.LoadCollectionObjects method to load collection properties.
CanLoadCollectionObjectsAsynchronously Indicates if an object layer can call the SessionObjectLayer.LoadCollectionObjectsAsync method to asynchronously load collection properties.
Connection Provides access to the current object layer’s IDbConnection object that is used to access a database.
DataLayer Provides access to the current object layer’s data access layer that is used to access a data store.
Dictionary Gets an object providing metadata on persistent objects stored in a data store.
ObjectLayer Returns the current SessionObjectLayer object.

Methods

Name Description
ClearDatabase() This member supports the internal infrastructure and is not intended to be used directly from your code.
CommitChanges(Session, ICollection, ICollection) Performs object layer specific operations that are required to commit object changes made in a specified session.
CommitChangesAsync(Session, ICollection, ICollection, AsyncCommitCallback) Performs object layer specific operations that are required to asynchronously commit object changes made in a specified session and notifies upon completion.
CommitChangesAsync(Session, ICollection, ICollection, CancellationToken) Asynchronously commits object changes made in a specified session and notifies upon completion.
CreateObjectType(XPObjectType) Performs object layer specific operations that are required to create an XPObjectType record.
CreateObjectTypeAsync(XPObjectType, CancellationToken) Asynchronously performs object layer specific operations that are required to create an XPObjectType record.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetObjectLayerWideObjectTypes() Returns a Dictionary<XPClassInfo,XPObjectType> specifying the correspondence of XPClassInfo objects to XPObjectType records.
GetObjectsByKey(Session, ObjectsByKeyQuery[]) Performs object layer specific operations that are required to return persistent objects from a specified session using queries based on specified object types and key values.
GetObjectsByKeyAsync(Session, ObjectsByKeyQuery[], CancellationToken) Retrieves object data from a session asynchronously, according to specified query parameters.
GetParentObjectsToDelete(Session) Performs object layer specific operations that are required to return a collection of objects marked for deletion in parent sessions.
GetParentObjectsToSave(Session) Performs object layer specific operations that are required to return a collection of objects marked for saving in parent sessions.
GetParentTouchedClassInfos(Session) Performs object layer specific operations that are required to return the metadata of objects modified in parent sessions relative to a specified session.
GetStaticCache(XPClassInfo) This member supports the internal infrastructure and is not intended to be used directly from your code.
GetType() Gets the Type of the current instance. Inherited from Object.
IsParentObjectToDelete(Session, Object) Performs object layer specific operations that are required to determine if a specified object corresponds to an object marked for deletion in parent sessions.
IsParentObjectToSave(Session, Object) Performs object layer specific operations that are required to determine if a specified object corresponds to an object marked for saving in parent sessions.
IsStaticType(XPClassInfo) This member supports the internal infrastructure and is not intended to be used directly from your code.
LoadCollectionObjects(Session, XPMemberInfo, Object) Performs object layer specific operations that are required to load a collection property using specified settings.
LoadCollectionObjectsAsync(Session, XPMemberInfo, Object, CancellationToken) Performs object layer specific operations that are required to asynchronously load a collection property using specified settings.
LoadDelayedProperties(Session, IList, XPMemberInfo) Performs object layer specific operations that are required to load data to a specific property marked for delayed loading in specified objects.
LoadDelayedProperties(Session, Object, MemberPathCollection) Performs object layer specific operations that are required to load data to specific properties marked for delayed loading in a specified object.
LoadDelayedPropertiesAsync(Session, IList, XPMemberInfo, CancellationToken) Asynchronously loads data from a session to an object’s specific properties marked for delayed loading.
LoadDelayedPropertiesAsync(Session, Object, MemberPathCollection, CancellationToken) Asynchronously loads data from a session to an object’s specific properties marked for delayed loading.
LoadObjects(Session, ObjectsQuery[]) Performs object layer specific operations that are required to load persistent objects using specified settings.
LoadObjectsAsync(Session, ObjectsQuery[], AsyncLoadObjectsCallback) Performs object layer specific operations that are required to asynchronously load persistent objects using specified settings and notifies upon completion.
LoadObjectsAsync(Session, ObjectsQuery[], CancellationToken) Loads persistent objects asynchronously, according to specified query parameters.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
Purge() Performs object layer specific operations that are required to remove all objects marked for deletion.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
RegisterStaticTypes(XPClassInfo[]) This member supports the internal infrastructure and is not intended to be used directly from your code.
SelectData(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator) Performs object layer specific operations that are required to retrieve object data from a session using specified query parameters.
SelectDataAsync(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator, AsyncSelectDataCallback) Performs object layer specific operations that are required to asynchronously retrieve object data from a session using specified query parameters and notifies upon completion.
SelectDataAsync(Session, ObjectsQuery, CriteriaOperatorCollection, CriteriaOperatorCollection, CriteriaOperator, CancellationToken) Retrieves object data from a session asynchronously, according to specified query parameters.
SetObjectLayerWideObjectTypes(Dictionary<XPClassInfo, XPObjectType>) Designates a Dictionary<XPClassInfo,XPObjectType> specifying the correspondence of XPClassInfo objects to XPObjectType records.
ToString() Returns a string that represents the current object. Inherited from Object.
UpdateSchema(Boolean, XPClassInfo[]) Performs object layer specific operations that are required to update a data store’s schema according to the class descriptions of the specified types.
UpdateSchemaAsync(CancellationToken, Boolean, XPClassInfo[]) Asynchronously performs object layer specific operations that are required to update a data store’s schema according to the class descriptions of the specified types.

Events

Name Description
CustomSecurityCriteriaPatcher
ObjectsLoaded
SchemaInit Occurs when a data store’s schema is initialized or updated for the current object layer.
See Also