Skip to content

TransactionBuffer

Namespace: ThinkGeo.Core

This class represents the holding place for transactions that have not yet been committed.

public class TransactionBuffer

Inheritance ObjectTransactionBuffer

Properties

AddBuffer

Gets the in-memory buffer of features queued for insertion.

public Dictionary<string, Feature> AddBuffer { get; }

Property Value

Dictionary<String, Feature>
A dictionary keyed by feature identifier containing features to add.

Remarks:

It is recommended that you use this dictionary for reviewing and not for adding new items. The reason is that the Add, Delete and Edit methods to various validation checks. For example if you call the DeleteFeature twice it will handle the case that you really only want to delete the record once. Another example is if you edit a record twice it will replace the existing edit with the new one.

DeleteBuffer

Gets the collection of feature identifiers queued for deletion.

public Collection<string> DeleteBuffer { get; }

Property Value

Collection<String>
A collection of feature IDs that should be removed during commit.

Remarks:

It is recommended that you use this dictionary for reviewing and not for adding new items. The reason is that the Add, Delete and Edit methods to various validation checks. For example if you call the DeleteFeature twice it will handle the case that you really only want to delete the record once. Another example is if you edit a record twice it will replace the existing edit with the new one.

EditBuffer

Gets the in-memory buffer of features queued for update.

public Dictionary<string, Feature> EditBuffer { get; }

Property Value

Dictionary<String, Feature>
A dictionary keyed by feature identifier containing updated feature data.

Remarks:

It is recommended that you use this dictionary for reviewing and not for adding new items. The reason is that the Add, Delete and Edit methods to various validation checks. For example if you call the DeleteFeature twice it will handle the case that you really only want to delete the record once. Another example is if you edit a record twice it will replace the existing edit with the new one.

AddColumnBuffer

Gets or sets the AddColumnBuffer.

public Collection<FeatureSourceColumn> AddColumnBuffer { get; }

Property Value

Collection<FeatureSourceColumn>

DeleteColumnBuffer

Gets or sets the DeleteColumnBuffer.

public Collection<string> DeleteColumnBuffer { get; }

Property Value

Collection<String>

UpdateColumnBuffer

Gets or sets the UpdateColumnBuffer.

public Dictionary<string, FeatureSourceColumn> UpdateColumnBuffer { get; }

Property Value

Dictionary<String, FeatureSourceColumn>

Constructors

TransactionBuffer()

This is the class constructor.

public TransactionBuffer()

Remarks:

This is the default constructor and is typically not used.

TransactionBuffer(Dictionary<String, Feature>, Collection<String>, Dictionary<String, Feature>)

This is the class constructor.

public TransactionBuffer(Dictionary<string, Feature> addBuffer, Collection<string> deleteBuffer, Dictionary<string, Feature> editBuffer)

Parameters

addBuffer Dictionary<String, Feature>

deleteBuffer Collection<String>

editBuffer Dictionary<String, Feature>

Remarks:

None.

Methods

Clear()

This method will clear all the items in AddBuffer, EditBuffer and DeleteBuffer.

public void Clear()

Remarks:

AddFeature(Feature)

This method allows you to add InternalFeatures to the transaction buffer.

public void AddFeature(Feature feature)

Parameters

feature Feature
This parameter represents the Feature you are adding to the transaction buffer.

Remarks:

None

AddFeature(BaseShape)

This method allows you to add a shape into the buffer.

public void AddFeature(BaseShape baseShape)

Parameters

baseShape BaseShape
This parameter represents the shape to be added.

Remarks:

None

AddFeature(BaseShape, Dictionary<String, String>)

This method allows you to add a shape into the buffer.

public void AddFeature(BaseShape baseShape, Dictionary<string, string> columnValues)

Parameters

baseShape BaseShape
This parameter represents the shape to be added.

columnValues Dictionary<String, String>
This parameter represents the feature value to be added.

Remarks:

None

DeleteFeature(String)

This method allows you to add a placeholder to represent a Feature to be deleted.

public void DeleteFeature(string featureId)

Parameters

featureId String
This parameter represents the unique Id for the specific Feature being passed in.

Remarks:

This does not remove a feature from the TransactionBuffer but rather it add a "to be deleted record". In this way when the TransactionBuffer if processed we know what records need to be deleted.

EditFeature(Feature)

This method allows you to add a Feature to be updated.

public void EditFeature(Feature feature)

Parameters

feature Feature
This parameter represents the Feature to be updated.

Remarks:

None

EditFeature(BaseShape)

This method allows you to add a shape to be updated.

public void EditFeature(BaseShape baseShape)

Parameters

baseShape BaseShape
The shape ID should be the same as the feature you are going to update.

Remarks:

None

EditFeature(BaseShape, Dictionary<String, String>)

This method allows you to add a shape to be updated.

public void EditFeature(BaseShape baseShape, Dictionary<string, string> columnValues)

Parameters

baseShape BaseShape
The shape ID should be the same as the feature you are going to update.

columnValues Dictionary<String, String>

Remarks:

None

AddColumn(FeatureSourceColumn)

Performs add column.

public void AddColumn(FeatureSourceColumn featureSourceColumn)

Parameters

featureSourceColumn FeatureSourceColumn
The feature source column.

DeleteColumn(String)

Performs delete column.

public void DeleteColumn(string columnName)

Parameters

columnName String
The column name.

UpdateColumn(String, FeatureSourceColumn)

Performs update column.

public void UpdateColumn(string columnName, FeatureSourceColumn newFeatureSourceColumn)

Parameters

columnName String
The column name.

newFeatureSourceColumn FeatureSourceColumn
The new feature source column.