Class EntitySchemaColumnDef
Represents the default value for the schema column.
Inheritance
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
[DesignModeGroup(Name = "General", Position = 1)]
[DesignModeProperty(Name = "Source", Group = "General", MetaPropertyName = "FB1", UsageType = DesignModeUsageType.General, DefValue = EntitySchemaColumnDefSource.Const)]
[DesignModeProperty(Name = "ValueSource", Group = "General", MetaPropertyName = "FB2", UsageType = DesignModeUsageType.General)]
[DesignModeProperty(Name = "ReferenceSchemaUId", Group = "General", MetaPropertyName = "FB3", UsageType = DesignModeUsageType.General)]
[DesignModeProperty(Name = "SequencePrefix", Group = "General", MetaPropertyName = "FB4", UsageType = DesignModeUsageType.General)]
[DesignModeProperty(Name = "SequenceNumberOfChars", Group = "General", MetaPropertyName = "FB5", UsageType = DesignModeUsageType.General)]
public class EntitySchemaColumnDef : IMetaDataSerializable, ICloneable
Constructors
EntitySchemaColumnDef()
Initializes a new EntitySchemaColumnDef instance.
Declaration
public EntitySchemaColumnDef()
EntitySchemaColumnDef(EntitySchemaColumnDef)
Initializes a new EntitySchemaColumnDef instance that is a clone of the specified column.
Declaration
public EntitySchemaColumnDef(EntitySchemaColumnDef source)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaColumnDef | source | Column whose clone is being created. |
Properties
IsConstantValue
Determines whether the default value is a constant.
Declaration
public bool IsConstantValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDateOrTimeDataValueType
Determines whether the default value is a date value or a date and time value.
Declaration
public bool IsDateOrTimeDataValueType { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSystemValue
Determines whether the default value is a system value.
Declaration
public bool IsSystemValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsValueListDataValueType
Determines whether the default value is the value from the virtual data set.
Declaration
public bool IsValueListDataValueType { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ParentColumn
Column that contains the given default value.
Declaration
public EntitySchemaColumn ParentColumn { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumn |
ReferenceSchemaUId
Reference to the schema that contains the column containing the given default value.
Declaration
public Guid ReferenceSchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
ReferenceValueListSchemaUId
Unique identifier of the virtual data set which the current default value references.
Declaration
public Guid ReferenceValueListSchemaUId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
SequenceNumberOfChars
Declaration
public int SequenceNumberOfChars { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SequencePrefix
Declaration
public string SequencePrefix { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Source
Source for the default value.
Declaration
public EntitySchemaColumnDefSource Source { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumnDefSource |
SystemUserConnection
User connection.
Declaration
public UserConnection SystemUserConnection { get; set; }
Property Value
Type | Description |
---|---|
UserConnection |
SystemValue
The system value of the column.
Declaration
public SystemValue SystemValue { get; }
Property Value
Type | Description |
---|---|
SystemValue |
Exceptions
Type | Condition |
---|---|
InvalidObjectStateException | If a bad identifier of the system value is set for the default value. |
Value
The default value.
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |
Exceptions
Type | Condition |
---|---|
UnsupportedTypeException | If the source for the default value is not valid for this column. |
ValueSource
Source for obtaining default values.
Declaration
public object ValueSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
AllowDefValue()
Returns true if reading def value allowed.
Declaration
public virtual bool AllowDefValue()
Returns
Type | Description |
---|---|
System.Boolean |
ApplyMetaDataValue(DataReader)
Initializes the base properties of the column from the metadata.
Declaration
protected virtual void ApplyMetaDataValue(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | The DataReader instance that provides metadata proofreading. |
Clone()
Gets a default value that is a clone of the current default value.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | The EntitySchemaColumnDef instance that is a clone of the current default value. |
Equals(Object)
Determines whether the specified System.Object entity is equal to the current default value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The entity to compare with the current default value. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Remarks
Method is overloaded.
Equals(EntitySchemaColumnDef)
Determines whether the specified EntitySchemaColumnDef default value is equal to the current default value.
Declaration
public bool Equals(EntitySchemaColumnDef comparedValue)
Parameters
Type | Name | Description |
---|---|---|
EntitySchemaColumnDef | comparedValue | The default value to compare with the current default value. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
Method is overloaded.
GetDisplayValue()
Returns column default display value.
Declaration
public string GetDisplayValue()
Returns
Type | Description |
---|---|
System.String | Column default display value. |
GetDisplayValue(UserConnection)
Returns column default display value.
Declaration
public string GetDisplayValue(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User Connection. |
Returns
Type | Description |
---|---|
System.String | Column default display value. |
Exceptions
Type | Condition |
---|---|
UnsupportedTypeException | If the column is set to an unsupported default source. |
GetFilteredSettingsList(DataValueType, UserConnection)
Gets the filtered list of settings depending on the specified column data type.
Declaration
public static Dictionary<string, string> GetFilteredSettingsList(DataValueType dataValueType, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
DataValueType | dataValueType | The type of the column data. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | Filtered list of settings for the |
GetHashCode()
Gets a hash code for the instance of the default value.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code of the column. |
Overrides
ReadMetaData(DataReader)
Reads the default values from metadata using the specified DataReader.
Declaration
public void ReadMetaData(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | The DataReader instance that reads metadata of the default value. |
WriteMetaData(DataWriter)
Writes the metadata of the default value using the specified DataWriter instance.
Declaration
public void WriteMetaData(DataWriter writer)
Parameters
Type | Name | Description |
---|---|---|
DataWriter | writer | The DataWriter instance that records metadata of the default value. |