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
SessionclassInfo
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
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
objectThe persistent object.
handler
IObjectChangeThe 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
objectThe persistent object.
handler
ObjectChangeEventHandlerThe 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
CriteriaOperatorA 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
stringA 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
stringA 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
XPMemberInfooldValue
objectnewValue
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
CriteriaOperatorA 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
stringA 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
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
stringA 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
OnDeleting()
protected override void OnDeleting()
OnLoaded()
protected override void OnLoaded()
OnSaved()
protected override void OnSaved()
RaiseChangeEvent(ObjectChangeEventArgs)
protected void RaiseChangeEvent(ObjectChangeEventArgs args)
Parameters
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
objectargs
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
objectThe persistent object.
handler
IObjectChangeThe 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
objectThe persistent object.
handler
ObjectChangeEventHandlerThe 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
stringA 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
objectAn object which represents the new value.
TriggerObjectChanged(ObjectChangeEventArgs)
protected override void TriggerObjectChanged(ObjectChangeEventArgs args)
Parameters
Events
Changed
Occurs when a property of the object is changed.
public event ObjectChangeEventHandler Changed