Class ClassStructureInfo
- Namespace
 - CMS.DataEngine
 
- Assembly
 - CMS.DataEngine.dll
 
Class information.
public class ClassStructureInfo
  - Inheritance
 - 
      objectClassStructureInfo
 
- Derived
 
- Extension Methods
 
Constructors
ClassStructureInfo()
Constructor.
protected ClassStructureInfo()
  ClassStructureInfo(string, string, string)
Constructor.
public ClassStructureInfo(string className, string xmlSchema, string tableName)
  Parameters
classNamestringClass name
xmlSchemastringClass XML schema
tableNamestringTable 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.
StringColumns
List of string column names
[Obsolete("Property was not intended for public use and will be removed.")]
public List<string> StringColumns { get; protected set; }
  Property Value
- List<string>
 
TableName
Table name
public string TableName { get; set; }
  Property Value
- string
 
Methods
CheckComplete(object[])
Checks whether the given data is complete (has all columns set to some value).
[Obsolete("Method was not intended for public use and will be removed.")]
public bool CheckComplete(object[] data)
  Parameters
dataobject[]Data to check
Returns
- bool
 
Combine(string, params ClassStructureInfo[])
Combines class structure definitions to the one
[Obsolete("Method was not intended for public use and will be removed.")]
public static ClassStructureInfo Combine(string source, params ClassStructureInfo[] structures)
  Parameters
sourcestringSource of the data (database table or view)
structuresClassStructureInfo[]List of structure definitions to combine
Returns
ContainsColumn(string)
Returns true if the data class has the specified column.
public bool ContainsColumn(string columnName)
  Parameters
columnNamestringColumn name
Returns
- bool
 
ConvertDataToParams(IDataClass, bool, bool)
Creates QueryDataParameters representing the dataClass.
[Obsolete("Method is deprecated and will be removed in next version.")]
public QueryDataParameters ConvertDataToParams(IDataClass dataClass, bool allowMissing, bool nullForMissing)
  Parameters
dataClassIDataClassData class for which to create QueryDataParameters representation.
allowMissingboolA value indicating whether missing values within
dataClassare allowed (suitable for a partial update query).nullForMissingboolA value indicating whether missing values are filled with
nullvalue.
Returns
- QueryDataParameters
 Returns QueryDataParameters representing the
dataClass.
GetClassInfo(string)
Returns the class info for specified class.
public static ClassStructureInfo GetClassInfo(string className)
  Parameters
classNamestringClass name
Returns
GetColumnIndex(string)
Gets the column index.
public int GetColumnIndex(string columnName)
  Parameters
columnNamestringColumn name.
Returns
- int
 Returns column index if exists; otherwise -1.
GetColumnType(string)
Gets the column type.
public Type GetColumnType(string columnName)
  Parameters
columnNamestringColumn name
Returns
- Type
 
GetColumns(params string[])
Gets the columns for the listed class names
[Obsolete("Method was not intended for public use and will be removed.")]
public static List<string> GetColumns(params string[] classNames)
  Parameters
classNamesstring[]List of class names to get
Returns
- List<string>
 
GetColumns(Type)
Gets the list of columns of the given type
[Obsolete("Method was not intended for public use and will be removed.")]
public List<string> GetColumns(Type type)
  Parameters
typeTypeType to match
Returns
- List<string>
 
GetNewData()
Gets new data array for object of the given class.
[Obsolete("Method was not intended for public use and will be removed.")]
public object[] GetNewData()
  Returns
- object[]
 
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
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
colNamestringColumn name
colTypeTypeColumn type
Remove(string, bool)
Removes the specified class structure definition.
public static void Remove(string className, bool logTask)
  Parameters
classNamestringClassName to remove
logTaskboolIf true, web farm tasks are logged
SetAllMissing(object[])
Sets all the items in the data to missing values.
[Obsolete("Method was not intended for public use and will be removed.")]
public void SetAllMissing(object[] data)
  Parameters
dataobject[]Data to set