Class EntityColumnValue
The value of the entity column.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Entities
Assembly: Terrasoft.Core.dll
Syntax
public class EntityColumnValue : ICloneable
Constructors
EntityColumnValue(EntityColumnValue)
Initializes a new EntityColumnValue instance that is a clone of the specified value.
Declaration
public EntityColumnValue(EntityColumnValue source)
Parameters
Type | Name | Description |
---|---|---|
EntityColumnValue | source | The entity column value whose clone is being created. |
EntityColumnValue(UserConnection)
Initializes a new EntityColumnValue instance, using the specified user connection.
Declaration
public EntityColumnValue(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
Properties
Column
The schema column that corresponds to the current value of the entity column.
Declaration
public EntitySchemaColumn Column { get; set; }
Property Value
Type | Description |
---|---|
EntitySchemaColumn |
IsChanged
Indicates whether the value has been changed.
Declaration
public bool IsChanged { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLoaded
Determines whether the value is loaded.
Declaration
public bool IsLoaded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsVirtual
Indicates whether the value is virtual and will not be saved in the database.
Declaration
public bool IsVirtual { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalizableValue
Declaration
public LocalizableString LocalizableValue { get; }
Property Value
Type | Description |
---|---|
LocalizableString |
Name
The name of the entity column value.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
OldValue
The previous value.
Declaration
public object OldValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
StreamBytes
The stored value as a System.Byte array for the column of the binary type.
Declaration
public byte[] StreamBytes { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
UserConnection
User connection.
Declaration
public UserConnection UserConnection { get; set; }
Property Value
Type | Description |
---|---|
UserConnection |
Value
The stored value.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Exceptions
Type | Condition |
---|---|
InvalidObjectStateException | If the column value is not loaded. |
Methods
ClearValue()
Clears column values.
Declaration
public void ClearValue()
Clone()
Creates a clone of the current value of the entity column.
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A clone of the current value of the entity column. |
IsStreamBytesEquals(Byte[])
Declaration
public bool IsStreamBytesEquals(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value |
Returns
Type | Description |
---|---|
System.Boolean |
IsValueEquals(Object)
Declaration
public bool IsValueEquals(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value |
Returns
Type | Description |
---|---|
System.Boolean |
LoadValue(IDataReader, Int32, Int32)
Loads the value from the passed-in System.Data.IDataReader instance.
Declaration
public void LoadValue(IDataReader dataReader, int fieldIndex, int packageSize)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDataReader | dataReader | The System.Data.IDataReader instance from which the value is loaded. |
System.Int32 | fieldIndex | Index of the field that will be loaded in the System.Data.IDataReader. |
System.Int32 | packageSize | The packet size. |
LoadValue(Object)
Loads the passed-in value of the System.Object type.
Declaration
public void LoadValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value of the System.Object type that is being loaded. |
ResetOldValue()
The current value of the entity column overwrites the old value.
Declaration
public void ResetOldValue()
ResetValue()
Reverts changes to the previous value of the entity column.
Declaration
public void ResetValue()
Validate(EntityValidationMessageCollection)
Verifies that the column value is correct.
Declaration
public bool Validate(EntityValidationMessageCollection validationMessages)
Parameters
Type | Name | Description |
---|---|---|
EntityValidationMessageCollection | validationMessages | Collection of messages about verification of the column value. |
Returns
Type | Description |
---|---|
System.Boolean |
|