Table of Contents

Class XPBaseObject

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

Serves as a base for classes that represent persistent objects.

[NonPersistent]
[MemberDesignTimeVisibility(false)]
[OptimisticLocking(true)]
public abstract class XPBaseObject : PersistentBase, IXPObject, IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider, IXPDictionaryProvider, IXPCustomPropertyStore, IXPModificationsStore, IXPInvalidateableObject, IXPReceiveOnChangedFromDelayedProperty, IXPReceiveOnChangedFromArbitrarySource, INotifyPropertyChanged, IXPImmutableHashCode, IEditableObject, ICustomTypeDescriptor, IComparable, IXPReceiveOnChangedFromXPPropertyDescriptor
Inheritance
XPBaseObject
Implements
Derived
Inherited Members

Constructors

XPBaseObject()

protected XPBaseObject()

XPBaseObject(Session)

protected XPBaseObject(Session session)

Parameters

session Session

XPBaseObject(Session, XPClassInfo)

protected XPBaseObject(Session session, XPClassInfo classInfo)

Parameters

session Session
classInfo XPClassInfo

Fields

AutoSaveOnEndEdit

Specifies whether changes in a persistent object are automatically committed to a database after you have finished editing the object in a bound control.

To learn more, refer to How to: Control Automatic Saving of Objects when Editing in a Grid and How to: Prevent Changes in a Persistent Object from being Automatically Committed.

public static bool AutoSaveOnEndEdit

Field Value

bool

Properties

This

Refers to the current instance.

[Browsable(false)]
public object This { get; }

Property Value

object

An XPBaseObject object which represents the current object.

Methods

AddChangedEventHandler(object, IObjectChange)

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public static void AddChangedEventHandler(object persistentObject, IObjectChange handler)

Parameters

persistentObject object

The persistent object.

handler IObjectChange

The event handler.

AddChangedEventHandler(object, ObjectChangeEventHandler)

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public static void AddChangedEventHandler(object persistentObject, ObjectChangeEventHandler handler)

Parameters

persistentObject object

The persistent object.

handler ObjectChangeEventHandler

The event handler.

AfterChangeByXPPropertyDescriptor()

protected virtual void AfterChangeByXPPropertyDescriptor()

BeforeChangeByXPPropertyDescriptor()

protected virtual void BeforeChangeByXPPropertyDescriptor()

BeginEdit()

protected virtual void BeginEdit()

CancelEdit()

protected virtual void CancelEdit()

Delete()

Deletes the persistent object and its aggregated objects from persistent storage.

public void Delete()

DoEndEditAction()

protected virtual void DoEndEditAction()

EndEdit()

protected virtual void EndEdit()

Evaluate(CriteriaOperator)

Evaluates the specified expression against the current instance of the persistent object.

public object Evaluate(CriteriaOperator expression)

Parameters

expression CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object that specifies the expression to evaluate.

Returns

object

The evaluated value.

Evaluate(string)

Evaluates the specified string expression against the current instance of the persistent object.

public object Evaluate(string expression)

Parameters

expression string

A string that specifies the expression to evaluate.

Returns

object

A value evaluated.

EvaluateAlias(string)

Evaluates an expression specified by the PersistentAliasAttribute attribute for the specified property.

public object EvaluateAlias(string memberName = null)

Parameters

memberName string

A string that specifies the name of the property that is declared with the PersistentAliasAttribute attribute.

Returns

object

A value evaluated.

FireChangedByCustomPropertyStore(XPMemberInfo, object, object)

protected virtual void FireChangedByCustomPropertyStore(XPMemberInfo member, object oldValue, object newValue)

Parameters

member XPMemberInfo
oldValue object
newValue object

FireChangedByXPPropertyDescriptor(string)

protected virtual void FireChangedByXPPropertyDescriptor(string memberName)

Parameters

memberName string

Fit(CriteriaOperator)

Checks whether the current instance matches the specified criteria.

public bool Fit(CriteriaOperator condition)

Parameters

condition CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator object that specifies a Boolean condition to check against the current instance.

Returns

bool

true if the current instance matches the specified criteria; otherwise, false.

Fit(string)

Checks whether the current instance matches the specified criteria.

public bool Fit(string condition)

Parameters

condition string

A string that specifies a Boolean condition to check against the current instance.

Returns

bool

true if the current instance matches the specified criteria; otherwise, false.

GetCollection(string)

protected XPCollection GetCollection(string propertyName = null)

Parameters

propertyName string

Returns

XPCollection

GetCollection<T>(string)

protected XPCollection<T> GetCollection<T>(string propertyName = null) where T : class

Parameters

propertyName string

Returns

XPCollection<T>

Type Parameters

T

GetMemberValue(string)

Returns the value of the specified property.

public object GetMemberValue(string propertyName)

Parameters

propertyName string

A string value which specifies the property’s name. If a property with the specified name isn’t found, the DevExpress.Data.Filtering.Exceptions.InvalidPropertyPathException is thrown.

Returns

object

An object which represents the value of the specified property.

Invalidate(bool)

protected override void Invalidate(bool disposing)

Parameters

disposing bool

OnChanged()

protected void OnChanged()

OnChanged(string)

protected void OnChanged(string propertyName)

Parameters

propertyName string

OnChanged(string, object, object)

protected override void OnChanged(string propertyName, object oldValue, object newValue)

Parameters

propertyName string
oldValue object
newValue object

OnDeleting()

protected override void OnDeleting()

OnLoaded()

protected override void OnLoaded()

OnSaved()

protected override void OnSaved()

RaiseChangeEvent(ObjectChangeEventArgs)

protected void RaiseChangeEvent(ObjectChangeEventArgs args)

Parameters

args ObjectChangeEventArgs

RaiseChangedEvent(object, ObjectChangeEventArgs)

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public static void RaiseChangedEvent(object persistentObject, ObjectChangeEventArgs args)

Parameters

persistentObject object
args ObjectChangeEventArgs

Reload()

Reloads the state of the specified persistent object from the data store.

public void Reload()

RemoveChangedEventHandler(object, IObjectChange)

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public static void RemoveChangedEventHandler(object persistentObject, IObjectChange handler)

Parameters

persistentObject object

The persistent object.

handler IObjectChange

The event handler.

RemoveChangedEventHandler(object, ObjectChangeEventHandler)

This member supports the .NET Framework infrastructure and cannot be used directly from your code.

public static void RemoveChangedEventHandler(object persistentObject, ObjectChangeEventHandler handler)

Parameters

persistentObject object

The persistent object.

handler ObjectChangeEventHandler

The event handler.

Save()

Saves the object to the data store.

public void Save()

SetMemberValue(string, object)

Sets the value of the specified property.

public void SetMemberValue(string propertyName, object newValue)

Parameters

propertyName string

A string value which specifies the property name. If a property with the specified name isn’t found, a DevExpress.Data.Filtering.Exceptions.InvalidPropertyPathException is thrown.

newValue object

An object which represents the new value.

TriggerObjectChanged(ObjectChangeEventArgs)

protected override void TriggerObjectChanged(ObjectChangeEventArgs args)

Parameters

args ObjectChangeEventArgs

Events

Changed

Occurs when a property of the object is changed.

public event ObjectChangeEventHandler Changed

Event Type

ObjectChangeEventHandler