Delta

Overview

The Delta class contains a collection of DeltaChange items.

This collection maintains a list of inserted, deleted and updated rows in a DataTable. It's used by Data Abstract clients to send the modified rows back to the server and by the server to process the updates. deltas on the client can be created automatically when RemoteDataAdapter is called.

Location

 

constructor (SchemaDataTable)

Creates a new instance of the Delta class and initializes its strructure by the given Schema object.

 

constructor(aSchema: SchemaDataTable)

 

Delta(SchemaDataTable aSchema)

Parameters:

  • aSchema: Source data table schema.

constructor (DataTable)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(dataTable: DataTable)

 

Delta(DataTable dataTable)

Parameters:

  • dataTable: Source DataTable.

constructor (DataTable, Boolean)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(dataTable: DataTable; isReduced: Boolean)

 

Delta(DataTable dataTable, Boolean isReduced)

Parameters:

  • dataTable: Source DataTable.
  • isReduced: Flag indicating whether reduced Delta should be created.

constructor (SchemaDataTable, Boolean)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(schema: SchemaDataTable; isReduced: Boolean)

 

Delta(SchemaDataTable schema, Boolean isReduced)

Parameters:

  • schema: Source DataTable.
  • isReduced: Flag indicating whether reduced Delta should be created.

add (Integer): DeltaChange

Adds a new DeltaChange instance with provided Id.

Returns the newly added DeltaChange instance.

 

method add(aChangeId: Integer): DeltaChange

 

DeltaChange add(Integer aChangeId)

Parameters:


Adds a new DeltaChange and fills it with changed values from the given DataRow.

Returns the newly added DeltaChange instance.

 

method add(aDataRow: DataRow): DeltaChange

 

DeltaChange add(DataRow aDataRow)

Parameters:

  • aDataRow: Source DataRow.

Change

 

property Change[aIndex: Integer]: DeltaChange read;

 

DeltaChange Change[Integer aIndex] { __get; }

clear

Removes all DeltaChange items from changes collection and resets the CurrentChangeID property value.

 

method clear

 

void clear()

clone

Returns a copy of the current Delta instance. Note that both current and cloned Delta instances will contain references to the same DeltaChange instances.

 

method clone: Object

 

Object clone()

copyDataTableChanges  protected

Adds all changes in the provided DataTable into the DeltaChange collection.

 

method copyDataTableChanges(table: DataTable)

 

void copyDataTableChanges(DataTable table)

Parameters:

  • table: DataTable which changes should be added into the DeltaChange collection.

Count

 

property Count: Integer read;

 

Integer Count { __get; }

CurrentChangeID

 

property CurrentChangeID: Integer read write;

 

Integer CurrentChangeID { __get; __set; }

FieldsFilter

 

property FieldsFilter: array of String read write;

 

String[] FieldsFilter { __get; __set; }

FieldTypes

 

property FieldTypes[index: Integer]: DataType read;

 

DataType FieldTypes[Integer index] { __get; }

getFieldIndexInValueArray

Returns the index for a field in the underlying table.

The index can be used to get and set the values in DeltaChange.

This value is retrieved from the schema associated with this Delta.

 

method getFieldIndexInValueArray(aFieldName: String): Integer

 

Integer getFieldIndexInValueArray(String aFieldName)

Parameters:

  • aFieldName: A name of the field to get index for.

isReduced

Returns the value of the reduced property.

It indicates whether the Delta instance contains one ore more reduced DeltaChange.

 

method isReduced: Boolean

 

Boolean isReduced()

iterator  final

Returns an iterator, that goes through the internal collection of DeltaChange objects.

 

method iterator: Iterator<DeltaChange>

 

Iterator<DeltaChange> iterator()

Name

 

property Name: String read write;

 

String Name { __get; __set; }

removeUnnecessaryChanges

Cleans up the DeltaChange collection by removing all DeltaChange entries that don't have any data changes (ie have no data field value changes).

This is commonly used while reducing deltas in the data streamer.

 

method removeUnnecessaryChanges

 

void removeUnnecessaryChanges()

Schema

 

property Schema: SchemaDataTable read;

 

SchemaDataTable Schema { __get; }

setReduced

Sets the value of the reduced property.

It indicates whether the Delta instance contains one ore more reduced DeltaChange.

 

method setReduced(aValue: Boolean)

 

void setReduced(Boolean aValue)

Parameters:

  • aValue: A new value to set.

 

Change

 

property Change[aIndex: Integer]: DeltaChange read;

 

DeltaChange Change[Integer aIndex] { __get; }

Count

 

property Count: Integer read;

 

Integer Count { __get; }

CurrentChangeID

 

property CurrentChangeID: Integer read write;

 

Integer CurrentChangeID { __get; __set; }

FieldsFilter

 

property FieldsFilter: array of String read write;

 

String[] FieldsFilter { __get; __set; }

FieldTypes

 

property FieldTypes[index: Integer]: DataType read;

 

DataType FieldTypes[Integer index] { __get; }

Name

 

property Name: String read write;

 

String Name { __get; __set; }

Schema

 

property Schema: SchemaDataTable read;

 

SchemaDataTable Schema { __get; }

 

constructor (SchemaDataTable)

Creates a new instance of the Delta class and initializes its strructure by the given Schema object.

 

constructor(aSchema: SchemaDataTable)

 

Delta(SchemaDataTable aSchema)

Parameters:

  • aSchema: Source data table schema.

constructor (DataTable)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(dataTable: DataTable)

 

Delta(DataTable dataTable)

Parameters:

  • dataTable: Source DataTable.

constructor (DataTable, Boolean)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(dataTable: DataTable; isReduced: Boolean)

 

Delta(DataTable dataTable, Boolean isReduced)

Parameters:

  • dataTable: Source DataTable.
  • isReduced: Flag indicating whether reduced Delta should be created.

constructor (SchemaDataTable, Boolean)

Creates a new instance of the Delta class and initializes its name, owner and field names and types collections.

Changes from provided DataTable instance are used to fill the changes collection.

 

constructor(schema: SchemaDataTable; isReduced: Boolean)

 

Delta(SchemaDataTable schema, Boolean isReduced)

Parameters:

  • schema: Source DataTable.
  • isReduced: Flag indicating whether reduced Delta should be created.

add (Integer): DeltaChange

Adds a new DeltaChange instance with provided Id.

Returns the newly added DeltaChange instance.

 

method add(aChangeId: Integer): DeltaChange

 

DeltaChange add(Integer aChangeId)

Parameters:


Adds a new DeltaChange and fills it with changed values from the given DataRow.

Returns the newly added DeltaChange instance.

 

method add(aDataRow: DataRow): DeltaChange

 

DeltaChange add(DataRow aDataRow)

Parameters:

  • aDataRow: Source DataRow.

clear

Removes all DeltaChange items from changes collection and resets the CurrentChangeID property value.

 

method clear

 

void clear()

clone

Returns a copy of the current Delta instance. Note that both current and cloned Delta instances will contain references to the same DeltaChange instances.

 

method clone: Object

 

Object clone()

copyDataTableChanges  protected

Adds all changes in the provided DataTable into the DeltaChange collection.

 

method copyDataTableChanges(table: DataTable)

 

void copyDataTableChanges(DataTable table)

Parameters:

  • table: DataTable which changes should be added into the DeltaChange collection.

getFieldIndexInValueArray

Returns the index for a field in the underlying table.

The index can be used to get and set the values in DeltaChange.

This value is retrieved from the schema associated with this Delta.

 

method getFieldIndexInValueArray(aFieldName: String): Integer

 

Integer getFieldIndexInValueArray(String aFieldName)

Parameters:

  • aFieldName: A name of the field to get index for.

isReduced

Returns the value of the reduced property.

It indicates whether the Delta instance contains one ore more reduced DeltaChange.

 

method isReduced: Boolean

 

Boolean isReduced()

iterator  final

Returns an iterator, that goes through the internal collection of DeltaChange objects.

 

method iterator: Iterator<DeltaChange>

 

Iterator<DeltaChange> iterator()

removeUnnecessaryChanges

Cleans up the DeltaChange collection by removing all DeltaChange entries that don't have any data changes (ie have no data field value changes).

This is commonly used while reducing deltas in the data streamer.

 

method removeUnnecessaryChanges

 

void removeUnnecessaryChanges()

setReduced

Sets the value of the reduced property.

It indicates whether the Delta instance contains one ore more reduced DeltaChange.

 

method setReduced(aValue: Boolean)

 

void setReduced(Boolean aValue)

Parameters:

  • aValue: A new value to set.