Class PersistentBase
- 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 class PersistentBase : IXPObject, IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider, IXPDictionaryProvider, IXPCustomPropertyStore, IXPModificationsStore, IXPInvalidateableObject, IXPReceiveOnChangedFromDelayedProperty, IXPReceiveOnChangedFromArbitrarySource, INotifyPropertyChanged, IXPImmutableHashCode
- Inheritance
-
PersistentBase
- Implements
- Derived
- Inherited Members
Constructors
PersistentBase(Session)
protected PersistentBase(Session session)
Parameters
session
Session
PersistentBase(Session, XPClassInfo)
Initializes a new instance of the PersistentBase class.
public PersistentBase(Session session, XPClassInfo classInfo)
Parameters
session
SessionA Session object that represents the session used to load and save persistent objects. This value is assigned to the PersistentBase.Session property.
classInfo
XPClassInfoAn XPClassInfo descendant which provides the class metadata. This value is assigned to the PersistentBase.ClassInfo property.
Properties
ClassInfo
Gets a value that provides access to the metadata information of a class gathered via Reflection.
[MemberDesignTimeVisibility(false)]
[Browsable(false)]
public XPClassInfo ClassInfo { get; }
Property Value
- XPClassInfo
An XPClassInfo descendant which provides the class metadata.
Fields
Gets an object that contains field identifiers for Simplified Criteria Syntax.
public static PersistentBase.FieldsClass Fields { get; }
Property Value
- PersistentBase.FieldsClass
The FieldsClass object that can contain field identifies.
IsDeleted
Indicates whether the current persistent object is marked as deleted.
[Browsable(false)]
[MemberDesignTimeVisibility(false)]
public bool IsDeleted { get; }
Property Value
- bool
true if the current object is marked as deleted; otherwise, false.
IsInvalidated
protected virtual bool IsInvalidated { get; }
Property Value
IsLoading
Indicates whether the object is currently being initialized.
[MemberDesignTimeVisibility(false)]
[Browsable(false)]
public bool IsLoading { get; }
Property Value
- bool
true if the object is currently being initialized; otherwise, false.
IsSaving
[MemberDesignTimeVisibility(false)]
[Browsable(false)]
protected bool IsSaving { get; }
Property Value
Session
Gets the session used to load and save persistent objects.
[MemberDesignTimeVisibility(false)]
[Browsable(false)]
public Session Session { get; }
Property Value
Methods
AfterConstruction()
Invoked when the current object is about to be initialized after its creation.
public virtual void AfterConstruction()
CreateAssociationList(XPMemberInfo)
protected virtual IList CreateAssociationList(XPMemberInfo property)
Parameters
property
XPMemberInfo
Returns
CreateAssociationList<T>(XPMemberInfo)
protected virtual IList<T> CreateAssociationList<T>(XPMemberInfo property)
Parameters
property
XPMemberInfo
Returns
- IList<T>
Type Parameters
T
CreateCollection(XPMemberInfo)
protected virtual XPCollection CreateCollection(XPMemberInfo property)
Parameters
property
XPMemberInfo
Returns
CreateCollection<T>(XPMemberInfo)
protected virtual XPCollection<T> CreateCollection<T>(XPMemberInfo property)
Parameters
property
XPMemberInfo
Returns
- XPCollection<T>
Type Parameters
T
CreateManyToManyAliasList(IList, XPMemberInfo)
protected virtual IList CreateManyToManyAliasList(IList aliasedCollection, XPMemberInfo skippedProperty)
Parameters
aliasedCollection
IListskippedProperty
XPMemberInfo
Returns
CreateManyToManyAliasList<T>(IList, XPMemberInfo)
protected virtual IList<T> CreateManyToManyAliasList<T>(IList aliasedCollection, XPMemberInfo skippedProperty)
Parameters
aliasedCollection
IListskippedProperty
XPMemberInfo
Returns
- IList<T>
Type Parameters
T
CustomCreateCollection(XPMemberInfo)
protected virtual XPBaseCollection CustomCreateCollection(XPMemberInfo property)
Parameters
property
XPMemberInfo
Returns
Equals(object)
Determines whether the current object has the same settings as the specified object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true if the object specified by the parameter has the same settings as the current object; otherwise, false.
GetCustomPropertyStore(object)
This member supports the internal infrastructure and isn’t intended to be used directly from your code.
public static IXPCustomPropertyStore GetCustomPropertyStore(object theObject)
Parameters
theObject
object
Returns
GetDelayedPropertyValue(string)
protected object GetDelayedPropertyValue(string propertyName = null)
Parameters
propertyName
string
Returns
GetDelayedPropertyValue<T>(string)
protected T GetDelayedPropertyValue<T>(string propertyName = null)
Parameters
propertyName
string
Returns
- T
Type Parameters
T
GetHashCode()
Gets the hash code (a number) that corresponds to the value of the current PersistentBase object.
public override int GetHashCode()
Returns
- int
An integer value representing the hash code for the current object.
GetList(string)
protected IList GetList(string propertyName = null)
Parameters
propertyName
string
Returns
GetList<T>(string)
protected IList<T> GetList<T>(string propertyName = null)
Parameters
propertyName
string
Returns
- IList<T>
Type Parameters
T
GetModificationsStore(object)
Returns an object that stores information about the modified properties when the Session.TrackPropertiesModifications option is enabled.
public static IXPModificationsStore GetModificationsStore(object theObject)
Parameters
theObject
objectA persistent object that is modified.
Returns
- IXPModificationsStore
An IXPModificationsStore object that stores information about the modified properties.
GetPropertyValue(string)
protected object GetPropertyValue(string propertyName = null)
Parameters
propertyName
string
Returns
GetPropertyValue<T>(string)
protected T GetPropertyValue<T>(string propertyName = null)
Parameters
propertyName
string
Returns
- T
Type Parameters
T
Invalidate(bool)
protected virtual void Invalidate(bool disposing)
Parameters
disposing
bool
OnChanged(string, object, object)
Invoked after an object’s property has been changed.
protected virtual void OnChanged(string propertyName, object oldValue, object newValue)
Parameters
propertyName
stringA property whose value was changed.
oldValue
objectAn old value.
newValue
objectA new value.
OnDeleted()
protected virtual void OnDeleted()
OnDeleting()
Invoked when the current object is about to be deleted.
protected virtual void OnDeleting()
OnLoaded()
protected virtual void OnLoaded()
OnLoading()
protected virtual void OnLoading()
OnSaved()
protected virtual void OnSaved()
OnSaving()
Invoked when the current object is about to be saved.
protected virtual void OnSaving()
RaisePropertyChangedEvent(string)
protected void RaisePropertyChangedEvent(string propertyName)
Parameters
propertyName
string
SetDelayedPropertyValue(string, object)
protected bool SetDelayedPropertyValue(string propertyName, object newValue)
Parameters
Returns
SetDelayedPropertyValue<T>(string, T)
protected bool SetDelayedPropertyValue<T>(string propertyName, T newValue)
Parameters
propertyName
stringnewValue
T
Returns
Type Parameters
T
SetPropertyValue(string, ref bool, bool)
protected bool SetPropertyValue(string propertyName, ref bool propertyValueHolder, bool newValue)
Parameters
Returns
SetPropertyValue(string, ref DateTime, DateTime)
protected bool SetPropertyValue(string propertyName, ref DateTime propertyValueHolder, DateTime newValue)
Parameters
Returns
SetPropertyValue(string, ref decimal, decimal)
protected bool SetPropertyValue(string propertyName, ref decimal propertyValueHolder, decimal newValue)
Parameters
Returns
SetPropertyValue(string, ref double, double)
protected bool SetPropertyValue(string propertyName, ref double propertyValueHolder, double newValue)
Parameters
Returns
SetPropertyValue(string, ref Guid, Guid)
protected bool SetPropertyValue(string propertyName, ref Guid propertyValueHolder, Guid newValue)
Parameters
Returns
SetPropertyValue(string, ref int, int)
protected bool SetPropertyValue(string propertyName, ref int propertyValueHolder, int newValue)
Parameters
Returns
SetPropertyValue(string, ref long, long)
protected bool SetPropertyValue(string propertyName, ref long propertyValueHolder, long newValue)
Parameters
Returns
SetPropertyValue(string, ref bool?, bool?)
protected bool SetPropertyValue(string propertyName, ref bool? propertyValueHolder, bool? newValue)
Parameters
Returns
SetPropertyValue(string, ref DateTime?, DateTime?)
protected bool SetPropertyValue(string propertyName, ref DateTime? propertyValueHolder, DateTime? newValue)
Parameters
Returns
SetPropertyValue(string, ref decimal?, decimal?)
protected bool SetPropertyValue(string propertyName, ref decimal? propertyValueHolder, decimal? newValue)
Parameters
Returns
SetPropertyValue(string, ref double?, double?)
protected bool SetPropertyValue(string propertyName, ref double? propertyValueHolder, double? newValue)
Parameters
Returns
SetPropertyValue(string, ref Guid?, Guid?)
protected bool SetPropertyValue(string propertyName, ref Guid? propertyValueHolder, Guid? newValue)
Parameters
Returns
SetPropertyValue(string, ref int?, int?)
protected bool SetPropertyValue(string propertyName, ref int? propertyValueHolder, int? newValue)
Parameters
Returns
SetPropertyValue(string, ref long?, long?)
protected bool SetPropertyValue(string propertyName, ref long? propertyValueHolder, long? newValue)
Parameters
Returns
SetPropertyValue(string, object)
protected bool SetPropertyValue(string propertyName, object newValue)
Parameters
Returns
SetPropertyValue(string, ref string, string)
protected bool SetPropertyValue(string propertyName, ref string propertyValueHolder, string newValue)
Parameters
Returns
SetPropertyValue<T>(string, T)
protected bool SetPropertyValue<T>(string propertyName, T newValue)
Parameters
propertyName
stringnewValue
T
Returns
Type Parameters
T
SetPropertyValue<T>(string, ref T, T)
protected bool SetPropertyValue<T>(string propertyName, ref T propertyValueHolder, T newValue)
Parameters
propertyName
stringpropertyValueHolder
TnewValue
T
Returns
Type Parameters
T
ThrowObjectDisposedException()
protected virtual void ThrowObjectDisposedException()
ToString()
Returns a string which represents the current object.
public override string ToString()
Returns
- string
A string value which represents the current PersistentBase object.
TriggerObjectChanged(ObjectChangeEventArgs)
protected virtual void TriggerObjectChanged(ObjectChangeEventArgs args)
Parameters
Operators
operator ==(CriteriaOperator, PersistentBase)
public static BinaryOperator operator ==(CriteriaOperator prop, PersistentBase obj)
Parameters
prop
CriteriaOperatorobj
PersistentBase
Returns
- BinaryOperator
operator !=(CriteriaOperator, PersistentBase)
public static BinaryOperator operator !=(CriteriaOperator prop, PersistentBase obj)
Parameters
prop
CriteriaOperatorobj
PersistentBase
Returns
- BinaryOperator