Table of Contents

Class ClassStructureInfo

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Class information.

public class ClassStructureInfo
Inheritance
object
ClassStructureInfo
Derived
Extension Methods

Constructors

ClassStructureInfo()

Constructor.

protected ClassStructureInfo()

ClassStructureInfo(string, string, string)

Constructor.

public ClassStructureInfo(string className, string xmlSchema, string tableName)

Parameters

className string

Class name

xmlSchema string

Class XML schema

tableName string

Table name

Properties

BinaryColumns

List of binary column names

public List<string> BinaryColumns { get; protected set; }

Property Value

List<string>

ClassName

Class name.

public string ClassName { get; protected set; }

Property Value

string

ColumnDefinitions

Column definitions.

public List<ColumnDefinition> ColumnDefinitions { get; protected set; }

Property Value

List<ColumnDefinition>

ColumnIndexes

Column indexes dictionary [columnName] -> [columnIndex]

protected StringSafeDictionary<int> ColumnIndexes { get; set; }

Property Value

StringSafeDictionary<int>

ColumnNames

Column names.

public List<string> ColumnNames { get; }

Property Value

List<string>

ColumnsCount

Columns count.

public int ColumnsCount { get; }

Property Value

int

HasBinaryColumns

Returns true if this class has some binary columns

public bool HasBinaryColumns { get; }

Property Value

bool

IDColumn

ID column name(s).

public string IDColumn { get; protected set; }

Property Value

string

Remarks

Primary key can be identified by more than one column. In this case columns are separated by ';' character.

TableName

Table name

public string TableName { get; set; }

Property Value

string

Methods

ContainsColumn(string)

Returns true if the data class has the specified column.

public bool ContainsColumn(string columnName)

Parameters

columnName string

Column name

Returns

bool

GetClassInfo(string)

Returns the class info for specified class.

public static ClassStructureInfo GetClassInfo(string className)

Parameters

className string

Class name

Returns

ClassStructureInfo

GetColumnIndex(string)

Gets the column index.

public int GetColumnIndex(string columnName)

Parameters

columnName string

Column name.

Returns

int

Returns column index if exists; otherwise -1.

GetColumnType(string)

Gets the column type.

public Type GetColumnType(string columnName)

Parameters

columnName string

Column name

Returns

Type

GetNewDataSet()

Gets new data structure for class data as a DataSet.

public virtual DataSet GetNewDataSet()

Returns

DataSet

GetTableIndexes()

Gets underlying database table's indexes. Returns null when information regarding indexes is not available.

public ITableIndexes GetTableIndexes()

Returns

ITableIndexes

InitCollections()

Initializes the inner collections for structure

protected void InitCollections()

RegisterColumn(string, Type)

Registers the given column within the structure info

protected void RegisterColumn(string colName, Type colType)

Parameters

colName string

Column name

colType Type

Column type

Remove(string, bool)

Removes the specified class structure definition.

public static void Remove(string className, bool logTask)

Parameters

className string

ClassName to remove

logTask bool

If true, web farm tasks are logged