DataTableUtils

Overview

A static helper class that is used for operations with data tables and schemas.

Location

 

applyDataTableSchema

The method applies the given schema of data table to the given data table. Also the given schema's object is cached in the data table extended properties - you can use EXT_PROPERTY_SCHEMA_NAME constant to retrieve it or check if it's available.

 

class method applyDataTableSchema(aDataTable: DataTable; aSchemaTable: SchemaDataTable)

 

static void applyDataTableSchema(DataTable aDataTable, SchemaDataTable aSchemaTable)

Parameters:

  • aDataTable: An instantiated data table to apply structure based on the given schema.
  • aSchemaTable: A schema of the data table to apply.

createColumnForField

Returns the column that is configured to match the given schema field.

 

class method createColumnForField(aField: SchemaField): DataColumn

 

static DataColumn createColumnForField(SchemaField aField)

Parameters:

  • aField: A schema field to be used to create DataColumn.

EXT_PROPERTY_FIELD_DATA_TYPE

Java types and types from DA schema are not always fully compliant, thus this string constant is used to store original schema type in the extended properties of the data column when it is created from the schema field.

 

const EXT_PROPERTY_FIELD_DATA_TYPE: String = DataType

 

static final String EXT_PROPERTY_FIELD_DATA_TYPE = DataType

EXT_PROPERTY_FIELD_LOG_CHANGES

The constant is used to store boolean value in data table's extended properties that defines whether a changes to the column should be sent back to the server. This flag is taken from table schema.

 

const EXT_PROPERTY_FIELD_LOG_CHANGES: String = LogChanges

 

static final String EXT_PROPERTY_FIELD_LOG_CHANGES = LogChanges

EXT_PROPERTY_SCHEMA_NAME

A string key constant that is used to store schema object in extended properties of related data table.

 

const EXT_PROPERTY_SCHEMA_NAME: String = Schema

 

static final String EXT_PROPERTY_SCHEMA_NAME = Schema

getDataTableSchema

Returns cached instance of table schema object from the extended properties of the DataTable.

 

class method getDataTableSchema(aDataTable: DataTable): SchemaDataTable

 

static SchemaDataTable getDataTableSchema(DataTable aDataTable)

Parameters:

  • aDataTable: A data table to look in.

 

EXT_PROPERTY_FIELD_DATA_TYPE

Java types and types from DA schema are not always fully compliant, thus this string constant is used to store original schema type in the extended properties of the data column when it is created from the schema field.

 

const EXT_PROPERTY_FIELD_DATA_TYPE: String = DataType

 

static final String EXT_PROPERTY_FIELD_DATA_TYPE = DataType

EXT_PROPERTY_FIELD_LOG_CHANGES

The constant is used to store boolean value in data table's extended properties that defines whether a changes to the column should be sent back to the server. This flag is taken from table schema.

 

const EXT_PROPERTY_FIELD_LOG_CHANGES: String = LogChanges

 

static final String EXT_PROPERTY_FIELD_LOG_CHANGES = LogChanges

EXT_PROPERTY_SCHEMA_NAME

A string key constant that is used to store schema object in extended properties of related data table.

 

const EXT_PROPERTY_SCHEMA_NAME: String = Schema

 

static final String EXT_PROPERTY_SCHEMA_NAME = Schema

 

applyDataTableSchema

The method applies the given schema of data table to the given data table. Also the given schema's object is cached in the data table extended properties - you can use EXT_PROPERTY_SCHEMA_NAME constant to retrieve it or check if it's available.

 

class method applyDataTableSchema(aDataTable: DataTable; aSchemaTable: SchemaDataTable)

 

static void applyDataTableSchema(DataTable aDataTable, SchemaDataTable aSchemaTable)

Parameters:

  • aDataTable: An instantiated data table to apply structure based on the given schema.
  • aSchemaTable: A schema of the data table to apply.

createColumnForField

Returns the column that is configured to match the given schema field.

 

class method createColumnForField(aField: SchemaField): DataColumn

 

static DataColumn createColumnForField(SchemaField aField)

Parameters:

  • aField: A schema field to be used to create DataColumn.

getDataTableSchema

Returns cached instance of table schema object from the extended properties of the DataTable.

 

class method getDataTableSchema(aDataTable: DataTable): SchemaDataTable

 

static SchemaDataTable getDataTableSchema(DataTable aDataTable)

Parameters:

  • aDataTable: A data table to look in.