CalculatedDataColumn

Overview

CalculatedDataColumn is a specialization of the general DataColumn class, and represents a field for which the value is not stored directly in the DataTable, but calculated at runtime. In contrast to the LookupDataColumns, which obtain their value automatically by referring to another table, calculated fields depend on the developer to provide custom code that determines the value of the field, as needed. For this, an implementation of CalculatedDataColumn.Evaluator interface should be assigned to the calculated field, with the havind a custom logic in its evaluate method. Note, that calculated values are not cached in any way, hence a new calculation will be called on each new felds value retrieval.

Location

 

constructor

Emty constructor that creates an instance of the CalculatedDataColumn.

 

constructor

 

CalculatedDataColumn()

constructor (String)    (declared in DataColumn)

Creates an instance of a column with the given name. Default data type is String.

 

constructor(aName: String)

 

CalculatedDataColumn(String aName)

Parameters:

  • aName: Given column name.

constructor (String, Class)    (declared in DataColumn)

Creates an instance of a column with the given name and value type.

 

constructor(aName: String; aDataType: Class)

 

CalculatedDataColumn(String aName, Class aDataType)

Parameters:

  • aName: Given column name.
  • aDataType: Given column data type.

constructor (String, Class, CalculatedDataColumn.Evaluator)

Creates an instance of the calculated column with the given name, value type, and evaluator instance.

 

constructor(aColumnName: String; aType: Class; anEvaluator: CalculatedDataColumn.Evaluator)

 

CalculatedDataColumn(String aColumnName, Class aType, CalculatedDataColumn.Evaluator anEvaluator)

Parameters:

  • aColumnName: The given column name.
  • aType: The given column data type.
  • anEvaluator: The given evaluator object.

AllowNull    (declared in DataColumn)

 

property AllowNull: Boolean read write;

 

Boolean AllowNull { __get; __set; }

AutoInc    (declared in DataColumn)

 

property AutoInc: Boolean read write;

 

Boolean AutoInc { __get; __set; }

AutoIncStart    (declared in DataColumn)

 

property AutoIncStart: Int64 read write;

 

Int64 AutoIncStart { __get; __set; }

AutoIncStep    (declared in DataColumn)

 

property AutoIncStep: Int64 read write;

 

Int64 AutoIncStep { __get; __set; }

Caption    (declared in DataColumn)

 

property Caption: String read write;

 

String Caption { __get; __set; }

clone    (declared in DataColumn)

Creates a clone of the current DataColumn.

 

method clone: DataColumn

 

DataColumn clone()

ColumnName    (declared in DataColumn)

 

property ColumnName: String read write;

 

String ColumnName { __get; __set; }

DataType    (declared in DataColumn)

 

property DataType: Class read write;

 

Class DataType { __get; __set; }

DefaultValue    (declared in DataColumn)

 

property DefaultValue: Object read write;

 

Object DefaultValue { __get; __set; }

evaluate

 

method evaluate(aRow: DataRow): Object

 

Object evaluate(DataRow aRow)

Parameters:

  • aRow:

intSetReadOnly  protected

Always returns TRUE, because calculated column is always read-only.

 

method intSetReadOnly(aValue: Boolean)

 

void intSetReadOnly(Boolean aValue)

Parameters:

  • aValue: A new value to set (ignored here).

MaxLength    (declared in DataColumn)

 

property MaxLength: Integer read write;

 

Integer MaxLength { __get; __set; }

Ordinal    (declared in DataColumn)

 

property Ordinal: Integer read write;

 

Integer Ordinal { __get; __set; }

Properties    (declared in DataColumn)

 

property Properties: PropertyCollection read;

 

PropertyCollection Properties { __get; }

ReadOnly    (declared in DataColumn)

 

property ReadOnly: Boolean read write;

 

Boolean ReadOnly { __get; __set; }

RowEvaluator

 

property RowEvaluator: CalculatedDataColumn.Evaluator read write;

 

CalculatedDataColumn.Evaluator RowEvaluator { __get; __set; }

setAutoInc    (declared in DataColumn)

Helper method to set incrementation mode of the column. Allows to enable autoincrementation, set its start value and increment value in one call.

 

method setAutoInc(aValue: Boolean; aStart: Long; aStep: Long)

 

void setAutoInc(Boolean aValue, Long aStart, Long aStep)

Parameters:

  • aValue: true - if auto inc enabled; otherwise - false.
  • aStart: The start value of values' incrementation
  • aStep: The increment/step value by which row's value wil be increased

Table    (declared in DataColumn)

 

property Table: DataTable read write;

 

DataTable Table { __get; __set; }

 

AllowNull    (declared in DataColumn)

 

property AllowNull: Boolean read write;

 

Boolean AllowNull { __get; __set; }

AutoInc    (declared in DataColumn)

 

property AutoInc: Boolean read write;

 

Boolean AutoInc { __get; __set; }

AutoIncStart    (declared in DataColumn)

 

property AutoIncStart: Int64 read write;

 

Int64 AutoIncStart { __get; __set; }

AutoIncStep    (declared in DataColumn)

 

property AutoIncStep: Int64 read write;

 

Int64 AutoIncStep { __get; __set; }

Caption    (declared in DataColumn)

 

property Caption: String read write;

 

String Caption { __get; __set; }

ColumnName    (declared in DataColumn)

 

property ColumnName: String read write;

 

String ColumnName { __get; __set; }

DataType    (declared in DataColumn)

 

property DataType: Class read write;

 

Class DataType { __get; __set; }

DefaultValue    (declared in DataColumn)

 

property DefaultValue: Object read write;

 

Object DefaultValue { __get; __set; }

MaxLength    (declared in DataColumn)

 

property MaxLength: Integer read write;

 

Integer MaxLength { __get; __set; }

Ordinal    (declared in DataColumn)

 

property Ordinal: Integer read write;

 

Integer Ordinal { __get; __set; }

Properties    (declared in DataColumn)

 

property Properties: PropertyCollection read;

 

PropertyCollection Properties { __get; }

ReadOnly    (declared in DataColumn)

 

property ReadOnly: Boolean read write;

 

Boolean ReadOnly { __get; __set; }

RowEvaluator

 

property RowEvaluator: CalculatedDataColumn.Evaluator read write;

 

CalculatedDataColumn.Evaluator RowEvaluator { __get; __set; }

Table    (declared in DataColumn)

 

property Table: DataTable read write;

 

DataTable Table { __get; __set; }

 

constructor

Emty constructor that creates an instance of the CalculatedDataColumn.

 

constructor

 

CalculatedDataColumn()

constructor (String)    (declared in DataColumn)

Creates an instance of a column with the given name. Default data type is String.

 

constructor(aName: String)

 

CalculatedDataColumn(String aName)

Parameters:

  • aName: Given column name.

constructor (String, Class)    (declared in DataColumn)

Creates an instance of a column with the given name and value type.

 

constructor(aName: String; aDataType: Class)

 

CalculatedDataColumn(String aName, Class aDataType)

Parameters:

  • aName: Given column name.
  • aDataType: Given column data type.

constructor (String, Class, CalculatedDataColumn.Evaluator)

Creates an instance of the calculated column with the given name, value type, and evaluator instance.

 

constructor(aColumnName: String; aType: Class; anEvaluator: CalculatedDataColumn.Evaluator)

 

CalculatedDataColumn(String aColumnName, Class aType, CalculatedDataColumn.Evaluator anEvaluator)

Parameters:

  • aColumnName: The given column name.
  • aType: The given column data type.
  • anEvaluator: The given evaluator object.

clone    (declared in DataColumn)

Creates a clone of the current DataColumn.

 

method clone: DataColumn

 

DataColumn clone()

evaluate

 

method evaluate(aRow: DataRow): Object

 

Object evaluate(DataRow aRow)

Parameters:

  • aRow:

intSetReadOnly  protected

Always returns TRUE, because calculated column is always read-only.

 

method intSetReadOnly(aValue: Boolean)

 

void intSetReadOnly(Boolean aValue)

Parameters:

  • aValue: A new value to set (ignored here).

setAutoInc    (declared in DataColumn)

Helper method to set incrementation mode of the column. Allows to enable autoincrementation, set its start value and increment value in one call.

 

method setAutoInc(aValue: Boolean; aStart: Long; aStep: Long)

 

void setAutoInc(Boolean aValue, Long aStart, Long aStep)

Parameters:

  • aValue: true - if auto inc enabled; otherwise - false.
  • aStart: The start value of values' incrementation
  • aStep: The increment/step value by which row's value wil be increased