Table of Contents

Class DataClassInfo

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Describes Data Class configuration.

[InfoCache(InfoCacheBy.ID|InfoCacheBy.Name|InfoCacheBy.Guid, Priority = InfoCachePriority.NotRemovable)]
public class DataClassInfo : DataClassInfoBase<DataClassInfo>, IExtensible, IInfo, IAdvancedDataContainer, ICMSObject, IHierarchicalDataContainer, IDataContainer, ISimpleDataContainer, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable, IMacroObject
Inheritance
object
DataClassInfo
Implements
Derived
Inherited Members
Extension Methods

Constructors

DataClassInfo()

Constructor - Creates an empty ClassInfo object.

[Obsolete("This constructor is meant for system purposes, it shouldn't be used directly. Use method DataClassInfo.New. For inheritance, use DataClassInfo(dummy).")]
public DataClassInfo()

DataClassInfo(bool)

Constructor, creates an empty DataClassInfo structure.

protected DataClassInfo(bool dummy)

Parameters

dummy bool

DataClassInfo(DataRow)

Constructor - Creates a new ClassInfo object from the given DataRow.

public DataClassInfo(DataRow dr)

Parameters

dr DataRow

DataRow with the object data

Fields

OBJECT_TYPE

Main object type to cover all class types

public const string OBJECT_TYPE = "cms.class"

Field Value

string

OBJECT_TYPE_SYSTEMTABLE

Object type for system table (customizable module class)

public const string OBJECT_TYPE_SYSTEMTABLE = "cms.systemtable"

Field Value

string

TYPEINFO

Type information for class covering all classes

public static ObjectTypeInfo TYPEINFO

Field Value

ObjectTypeInfo

TYPEINFOSYSTEMTABLE

Type information for system table (customizable module class)

public static ObjectTypeInfo TYPEINFOSYSTEMTABLE

Field Value

ObjectTypeInfo

mSchemaDataSet

Source schema dataset.

protected DataSet mSchemaDataSet

Field Value

DataSet

Properties

ClassCodeGenerationSettings

Class code generation settings

public override string ClassCodeGenerationSettings { get; set; }

Property Value

string

ClassCodeGenerationSettingsInfo

Gets or sets the code generation settings.

public ClassCodeGenerationSettings ClassCodeGenerationSettingsInfo { get; set; }

Property Value

ClassCodeGenerationSettings

ClassXmlSchema

Class xml schema

public override string ClassXmlSchema { get; set; }

Property Value

string

TypeInfo

Type information.

public override ObjectTypeInfo TypeInfo { get; }

Property Value

ObjectTypeInfo

Methods

DeleteData()

Deletes the object from the database.

protected override void DeleteData()

DeleteDataAsync(CancellationToken)

Asynchronously deletes the object from the database.

protected override Task DeleteDataAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task

DeleteObject()

Deletes the object using appropriate provider.

protected override void DeleteObject()

GetChildWhereCondition(WhereCondition, string)

Gets the child object where condition.

protected override WhereCondition GetChildWhereCondition(WhereCondition where, string objectType)

Parameters

where WhereCondition

Original where condition

objectType string

Object type of the child object

Returns

WhereCondition

GetDataQueryInternal()

Gets the data query for this object type

protected override IDataQuery GetDataQueryInternal()

Returns

IDataQuery

GetDataSet()

Returns an empty DataSet created by the class schema.

[Obsolete("Method is deprecated and will be removed in the next version.")]
[ObsoleteSince(27, 0)]
public DataSet GetDataSet()

Returns

DataSet

GetExisting()

Returns the existing object based on current object data.

protected override BaseInfo GetExisting()

Returns

BaseInfo

InsertAsCloneInternal(CloneSettings, CloneResult, BaseInfo)

Inserts cloned object to DB.

protected override void InsertAsCloneInternal(CloneSettings settings, CloneResult result, BaseInfo originalObject)

Parameters

settings CloneSettings

Cloning settings

result CloneResult

Cloning result

originalObject BaseInfo

Original source BaseInfo (object being cloned)

InsertDataInternal()

Inserts the object data to the database.

protected override void InsertDataInternal()
See Also

InsertDataInternalAsync(CancellationToken)

Asynchronously inserts the object data to the database.

protected override Task InsertDataInternalAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task
See Also

LoadDefaultData()

Loads the default data to the object.

protected override void LoadDefaultData()

RemoveObjectDependencies(bool, bool)

Removes object dependencies. First tries to execute removedependencies query, if not found, automatic process is executed.

protected override void RemoveObjectDependencies(bool deleteAll = false, bool clearHashtables = true)

Parameters

deleteAll bool

If false, only required dependencies are deleted, dependencies with default value are replaced with default value and nullable values are replaced with null

clearHashtables bool

If true, hashtables of all objecttypes which were potentially modified are cleared

SetObject()

Updates the object using appropriate provider.

protected override void SetObject()

UpdateDataInternal()

Updates the object data in the database.

protected override void UpdateDataInternal()
See Also

UpdateDataInternalAsync(CancellationToken)

Asynchronously updates the object data in the database.

protected override Task UpdateDataInternalAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation instruction.

Returns

Task
See Also

Validate()

Uses the DataClassInfoProvider's validation method to validate this info object.

protected override InfoValidationResult Validate()

Returns

InfoValidationResult