Class EntitySchemaColumn
Represents a schema column.
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
[MetaType("{D82CE7A8-867C-4b64-B5D6-B380BACFEDB5}")]
[DesignModeClass(DefNamePrefix = "Column")]
[DesignModePropertyChangeHandler(Action = DesignModePropertyChangeHandlerAction.SetIsVisible, DependedProperties = "ReferenceSchemaUId", Property = "DataValueType", Values = "b295071f-7ea9-4e62-8d1a-919bf3732ff2", ActionValue = true, Name = "DataValueType.ChangeHandler.ReferenceSchemaUId")]
[DesignModePropertyChangeHandler(Action = DesignModePropertyChangeHandlerAction.SetIsVisible, DependedProperties = "ReferenceEnumType", Values = "843cce32-51af-4442-b1e5-be74eb0a1a65", ActionValue = true, Property = "DataValueType", Name = "DataValueType.ChangeHandler.ReferenceEnumType")]
[DesignModePropertyChangeHandler(Action = DesignModePropertyChangeHandlerAction.SetIsVisible, DependedProperties = "IsWeakReference", ActionValue = true, Property = "DataValueType", Values = "b295071f-7ea9-4e62-8d1a-919bf3732ff2", Name = "DataValueType.ChangeHandler.IsWeakReference")]
[DesignModePropertyChangeHandler(Action = DesignModePropertyChangeHandlerAction.SetIsVisible, DependedProperties = "IsCascade", ActionValue = true, Property = "DataValueType", Values = "b295071f-7ea9-4e62-8d1a-919bf3732ff2", Name = "DataValueType.ChangeHandler.IsCascade")]
[DesignModeGroup(Name = "General", Position = 1)]
[DesignModeGroup(Name = "String", Position = 2)]
[DesignModeGroup(Name = "Lookup", Position = 3)]
[DesignModeGroup(Name = "Behaviour", Position = 5)]
[DesignModeProperty(Name = "Caption", AllowEditInherited = true, Group = "General", Position = 1, UsageType = DesignModeUsageType.General, MetaPropertyName = "E13", ValuesProvider = "LocalizableStringProvider", Editor = "xtype=localizabletextedit", ForeignPackageEditMode = ForeignPackageEditMode.Edit, IsRequired = true)]
[DesignModeProperty(Name = "Name", OverrideResources = true, Group = "General", Position = 2, UsageType = DesignModeUsageType.General, IsRequired = true)]
[DesignModeProperty(Name = "DataValueType", Group = "General", Position = 3, UsageType = DesignModeUsageType.Advanced, AllowEmpty = false, ValuesProvider = "DataValueTypeManagerInstanceValuesProvider", IsRequired = true)]
[DesignModeProperty(Name = "Description", Group = "General", Position = 4, MetaPropertyName = "E14", UsageType = DesignModeUsageType.Advanced, AllowEditInherited = true, ValuesProvider = "LocalizableStringProvider", Editor = "xtype=localizabletextedit", ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "ReferenceSchemaUId", Group = "Lookup", Position = 5, AllowEditInherited = true, ValuesProvider = "EntitySchemaManagerUIdValuesProvider", UsageType = DesignModeUsageType.General, OverrideResources = true)]
[DesignModeProperty(Name = "IsCascade", Group = "Lookup", Position = 6, UsageType = DesignModeUsageType.General, MetaPropertyName = "E9")]
[DesignModeProperty(Name = "IsWeakReference", Group = "Lookup", Position = 7, UsageType = DesignModeUsageType.Advanced, MetaPropertyName = "E8")]
[DesignModeProperty(Name = "RequirementType", Group = "Behaviour", Position = 8, UsageType = DesignModeUsageType.General, MetaPropertyName = "E2", ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "DefValue", Group = "Behaviour", MetaPropertyName = "E12", Position = 9, ValuesProvider = "ControlEntitySchemaColumnDefProvider", AllowEditInherited = true, UsageType = DesignModeUsageType.General, Editor = "xtype=controlentityschemacolumndefedit;dataProvider=controlentityschemacolumndefdataprovider", FormatType = DesignModePropertyScriptFormatType.SetMethod, ClientScriptFormat = "{0}.setImage({1});", ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsValueCloneable", Group = "Behaviour", Position = 10, UsageType = DesignModeUsageType.General, MetaPropertyName = "E5", AllowEditInherited = true, ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsIndexed", Group = "Behaviour", Position = 11, UsageType = DesignModeUsageType.Advanced, MetaPropertyName = "E6", ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsVirtual", Group = "Behaviour", Position = 12, UsageType = DesignModeUsageType.None, MetaPropertyName = "E4")]
[DesignModeProperty(Name = "UsageType", Group = "Behaviour", Position = 15, UsageType = DesignModeUsageType.Advanced, MetaPropertyName = "E15", ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsTrackChangesInDB", Group = "Behaviour", Position = 14, UsageType = DesignModeUsageType.Advanced, MetaPropertyName = "E16", AllowEditInherited = true)]
[DesignModeProperty(Name = "ColumnValueName", UsageType = DesignModeUsageType.None, MetaPropertyName = "E17")]
[DesignModeProperty(Name = "DisplayColumnValueName", UsageType = DesignModeUsageType.None, MetaPropertyName = "E18")]
[DesignModeProperty(Name = "IsMultiLineText", Group = "String", DefValue = false, Position = 17, MetaPropertyName = "E19", UsageType = DesignModeUsageType.General, ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsSimpleLookup", Group = "Lookup", DefValue = false, Position = 18, MetaPropertyName = "E20", UsageType = DesignModeUsageType.General, ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsLocalizable", Group = "String", DefValue = false, Position = 19, MetaPropertyName = "E21", UsageType = DesignModeUsageType.Advanced)]
[DesignModeProperty(Name = "IsMasked", Group = "String", DefValue = true, Position = 20, MetaPropertyName = "E22", UsageType = DesignModeUsageType.General, ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
[DesignModeProperty(Name = "IsSensitiveData", Group = "Behaviour", DefValue = false, Position = 21, MetaPropertyName = "E23", UsageType = DesignModeUsageType.General, ForeignPackageEditMode = ForeignPackageEditMode.Edit, AllowEditInherited = true)]
[DesignModeProperty(Name = "IsFormatValidated", Group = "String", DefValue = true, Position = 22, MetaPropertyName = "E25", UsageType = DesignModeUsageType.General, ForeignPackageEditMode = ForeignPackageEditMode.Edit)]
public class EntitySchemaColumn : SchemaProperty, IMetaItem, IMetaDataSerializable, ICloneable
Constructors
EntitySchemaColumn()
Initializes a new instance of the EntitySchemaColumn class.
Declaration
public EntitySchemaColumn()
EntitySchemaColumn(EntitySchema, DataValueType)
Initializes a new instance of the EntitySchemaColumn class with the specified data type in the specified schema.
Declaration
public EntitySchemaColumn(EntitySchema entitySchema, DataValueType dataValueType)
Parameters
Type | Name | Description |
---|---|---|
EntitySchema | entitySchema | Schema where the clone is being created. |
DataValueType | dataValueType | The data type of the column being created. |
EntitySchemaColumn(EntitySchemaColumn)
Initializes a new EntitySchemaColumn instance that is a clone of the specified column.
Declaration
public EntitySchemaColumn(EntitySchemaColumn source)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaColumn | source | Column whose clone is being created. |
Properties
Caption
The caption of the column.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column, typeof(LocalizableStringDBMetaTypeConverter))]
[MetaTypeProperty("{93A7D6E6-CFDE-4ed2-B731-FA1CFC932D55}", "Terrasoft.Core", "EntitySchemaColumn.Caption")]
public override LocalizableString Caption { get; set; }
Property Value
Type | Description |
---|---|
LocalizableString |
Overrides
ColumnValueName
The column name generated based on the value the column contains.
Declaration
[MetaTypeProperty("{9604C0DD-B8AD-4E75-95A0-29FE6F60C00D}")]
public virtual string ColumnValueName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Exceptions
Type | Condition |
---|---|
InvalidObjectStateException | If the column does not reference other schemas; that is, it is not the lookup type. |
InvalidObjectStateException | If the reference to the lookup schema is not specified for the column of the lookup type. |
InvalidObjectStateException | If the primary column is not specified in the lookup schema that the column references. |
CreatedInSchemaUId
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column, typeof(GuidDBMetaTypeConverter))]
public override Guid CreatedInSchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
DataValueType
The type of the column data.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column, typeof(DataValueTypeDBMetaTypeConverter))]
[MetaTypeProperty("{42C0C55C-E87F-44b9-A386-DB46F0A149F1}", Manager = "DataValueTypeManager")]
public override DataValueType DataValueType { get; set; }
Property Value
Type | Description |
---|---|
DataValueType |
Overrides
DefValue
The column value by default.
Declaration
[MetaTypeProperty("FF574424-5886-44B7-A79D-E42FAA64838C")]
public EntitySchemaColumnDef DefValue { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnDef |
Description
The description of the column.
Declaration
[MetaTypeProperty("{4F7A4059-AA6C-4B1B-9D47-9C4D07F65B3D}", "Terrasoft.Core", "EntitySchemaColumn.Description.Caption")]
public override LocalizableString Description { get; set; }
Property Value
Type | Description |
---|---|
LocalizableString |
Overrides
DisplayColumnValueName
Generates a string with the display column value based on the value the column contains.
Declaration
[MetaTypeProperty("{017AE8F6-B671-4A38-952B-988C09FFD7C0}")]
public virtual string DisplayColumnValueName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DisplayValueType
The data type of the display value of the column, which corresponds to the system type of the .NET framework.
Declaration
public Type DisplayValueType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Exceptions
Type | Condition |
---|---|
InvalidObjectStateException | If the list of lookup schemas is not specified for the column of the multilookup type. |
InvalidObjectStateException | If the primary column is not specified in the lookup schema that the column references. |
HasConstDefValue
Determines whether the default constant value is specified for the given column.
Declaration
public bool HasConstDefValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasDefValue
Determines whether the default value is specified for the given column.
Declaration
public bool HasDefValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasForeignKey
Gets true, if column has foreign key; false - otherwise.
Declaration
public bool HasForeignKey { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasReferenceSchemaList
Indicates whether the given column references other schemas.
Declaration
[Obsolete("7.14.0 | Property is not in use and will be removed in upcoming releases")]
public bool HasReferenceSchemaList { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Index
The index of the column.
Declaration
public EntitySchemaIndex Index { get; }
Property Value
Type | Description |
---|---|
EntitySchemaIndex |
IsCascade
For the column of the lookup type determines whether it is has the cascade delete relationship with the record from the lookup.
Declaration
[MetaTypeProperty("{E1E0767C-41F0-42ca-97F5-794D8B2CDDDE}", DefValue = false)]
public bool IsCascade { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDBReadOnly
Indicates whether the value of the given column will be written to the database table.
Declaration
public bool IsDBReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDBRequirement
Indicates whether the column is required at the database level.
Declaration
public bool IsDBRequirement { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFormatValidated
A flag that the value format of the column can be validated.
Declaration
[MetaTypeProperty("{22C2C43C-5DCC-42EE-8689-F6E4766AA403}", DefValue = false)]
public bool IsFormatValidated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsIndexed
Indicates whether the column is indexed.
Declaration
[MetaTypeProperty("{16B91F17-56A3-4957-A319-E53E3D6414AF}", DefValue = false)]
public bool IsIndexed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLocalizable
Indicates whether the localized value for the column us used.
Declaration
[MetaTypeProperty("{DE6AA0FC-9D6A-4567-A1D5-DEAB1CAB4A21}", DefValue = false)]
public bool IsLocalizable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMasked
Declaration
[MetaTypeProperty("{22C2C43C-5DCC-42EE-8689-F6E4751AA403}", DefValue = false)]
public bool IsMasked { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMultiLineText
Indicates whether the MemoEdit control is used for the column.
Declaration
[MetaTypeProperty("{6150C0CC-29C9-41E7-B660-9BA25A0433EA}", DefValue = false)]
public bool IsMultiLineText { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNullable
Indicates that column can have null value in DB.
Declaration
[MetaTypeProperty("{56C5B1B3-3A60-4D3E-8FE4-56B65B5C9BEA}", DefValue = null)]
public bool? IsNullable { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
IsSensitiveData
Indicates that column contains sensitive user data, regulated by GDPR.
Declaration
[MetaTypeProperty("{19331001-5A7A-485E-946A-063CDB101259}", DefValue = false)]
public bool IsSensitiveData { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSimpleLookup
Indicates whether the ComboBoxEdit control is used for the column.
Declaration
[MetaTypeProperty("{A176A943-A751-48FC-8217-92ECDF02BAD8}", DefValue = false)]
public bool IsSimpleLookup { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSystem
Declaration
public virtual bool IsSystem { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTrackChangesInDB
Indicates whether the column is logged.
Declaration
[MetaTypeProperty("{57d685f1-2de6-4b21-8596-7c144dce3785}", DefValue = false)]
public bool IsTrackChangesInDB { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsValueCloneable
Indicates whether the column is cloneable.
Declaration
[MetaTypeProperty("{54725A14-4A1F-4b75-9952-41388C7A7C74}", DefValue = true)]
public bool IsValueCloneable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsVirtual
Indicates whether the column is virtual.
Declaration
[MetaTypeProperty("{9D746581-DC90-4b0a-B32E-5BF6671E3ECE}", DefValue = false)]
public bool IsVirtual { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsWeakReference
Specifies that for a column with a lookup type, the link to the directory is weak at the database level, that means, there is no foreign key to verify integrity.
Declaration
[MetaTypeProperty("{EAE08D50-9404-4468-9E2D-457FAAF17AC9}", DefValue = false)]
public bool IsWeakReference { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Column name.
Declaration
public override string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
NamePrefix
Declaration
public override string NamePrefix { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ParentCollection
Collection of columns of the schema that owns the current column.
Declaration
public EntitySchemaColumnCollection ParentCollection { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnCollection |
PrimaryColorColumnValueName
Declaration
public virtual string PrimaryColorColumnValueName { get; }
Property Value
Type | Description |
---|---|
System.String |
PrimaryImageColumnValueName
Declaration
public virtual string PrimaryImageColumnValueName { get; }
Property Value
Type | Description |
---|---|
System.String |
ReferenceEnumType
Declaration
[MetaTypeProperty("{879C107F-B150-4c13-A67A-7B22FFC97E0C}")]
public Type ReferenceEnumType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
ReferenceSchema
The schema that the current column of the lookup type references.
Declaration
public override EntitySchema ReferenceSchema { get; set; }
Property Value
Type | Description |
---|---|
EntitySchema |
Overrides
ReferenceSchemaList
The list of references to schemas that the given column references.
Declaration
[Obsolete("7.14.0 | Property is not in use and will be removed in upcoming releases")]
public EntitySchemaColumnReferenceSchemaCollection ReferenceSchemaList { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnReferenceSchemaCollection |
ReferenceSchemaUId
The unique identifier that the current column of the lookup type references.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column, typeof(GuidDBMetaTypeConverter))]
[MetaTypeProperty("{0E119C8D-658F-4FF4-A605-9F34C1B00578}", Manager = "EntitySchemaManager")]
public override Guid ReferenceSchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
ReferenceValueListSchema
The virtual data set that the current column with the fixed list of values references.
Declaration
public override ValueListSchema ReferenceValueListSchema { get; set; }
Property Value
Type | Description |
---|---|
ValueListSchema |
Overrides
ReferenceValueListSchemaUId
Unique identifier of the virtual data set which the current column with the fixed list of values references.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column, typeof(GuidDBMetaTypeConverter))]
[MetaTypeProperty("{6CA6792F-EA79-4405-BB17-06E74F958DB0}", Manager = "ValueListSchemaManager")]
public override Guid ReferenceValueListSchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
RequirementType
The column required level.
Declaration
[MetaTypeProperty("{384621C4-184A-4f95-8C8D-16106A67CAE3}", DefValue = EntitySchemaColumnRequirementType.None)]
public EntitySchemaColumnRequirementType RequirementType { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnRequirementType |
SourceSchemaUIdColumnValueName
Declaration
public virtual string SourceSchemaUIdColumnValueName { get; }
Property Value
Type | Description |
---|---|
System.String |
UId
Column unique identifier.
Declaration
[DBMetaTypeProperty(DBMetaInfoItemType.Column | DBMetaInfoItemType.PrimaryKey | DBMetaInfoItemType.ForeignKey | DBMetaInfoItemType.DefValue, typeof(GuidDBMetaTypeConverter))]
public override Guid UId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Overrides
UsageType
The usage type for a column.
Declaration
[MetaTypeProperty("{EC8F2FEB-BEBC-46C1-A159-346D0ACB3F0C}", DefValue = EntitySchemaColumnUsageType.General, IsExtraProperty = true)]
public EntitySchemaColumnUsageType UsageType { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnUsageType |
ValueType
Data type of the column value, which corresponds to the system type of the .NET framework.
Declaration
public Type ValueType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
ApplyMetaDataValue(DataReader)
Initializes the base properties of the column from the metadata.
Declaration
protected override void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | The DataReader instance that provides metadata proofreading. |
Overrides
Clone()
Returns a column that is a clone of the given column.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | The EntitySchemaColumn instance that is a clone of the current column. |
Overrides
HandleNameChanging(String)
Declaration
public override void HandleNameChanging(string oldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | oldName |
Overrides
SetName(String)
Sets the specified name for the given column.
Declaration
public void SetName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the column. |
WriteMetaData(DataWriter)
Records schema metadata using the DataWriter instance.
Declaration
public override void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | The DataWriter instance that writes schema metadata. |