Table of Contents

Class TransactionBuffer

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

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

public class TransactionBuffer
Inheritance
TransactionBuffer
Inherited Members

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.

Properties

AddBuffer

This property gets the dictionary buffer that holds InternalFeatures to be added.

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

Property Value

Dictionary<string, Feature>

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

public Collection<FeatureSourceColumn> AddColumnBuffer { get; }

Property Value

Collection<FeatureSourceColumn>

DeleteBuffer

This property gets the dictionary buffer that holds InternalFeatures to be deleted.

public Collection<string> DeleteBuffer { get; }

Property Value

Collection<string>

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.

DeleteColumnBuffer

public Collection<string> DeleteColumnBuffer { get; }

Property Value

Collection<string>

EditBuffer

This property gets the dictionary buffer that holds InternalFeatures to be updated.

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

Property Value

Dictionary<string, Feature>

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.

UpdateColumnBuffer

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

Property Value

Dictionary<string, FeatureSourceColumn>

Methods

AddColumn(FeatureSourceColumn)

public void AddColumn(FeatureSourceColumn featureSourceColumn)

Parameters

featureSourceColumn FeatureSourceColumn

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

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

Clear()

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

public void Clear()

Remarks

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

DeleteColumn(string)

public void DeleteColumn(string columnName)

Parameters

columnName string

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(BaseShape)

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

public void EditFeature(BaseShape baseShape)

Parameters

baseShape BaseShape

This parameter represents the shape to be updated. 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

This parameter represents the shape to be updated. The shape ID should be the same as the feature you are going to update.

columnValues Dictionary<string, string>

This parameter represents the feature value to be updated. The shape ID should be the same as the feature you are going to update.

Remarks

None

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

UpdateColumn(string, FeatureSourceColumn)

public void UpdateColumn(string columnName, FeatureSourceColumn newFeatureSourceColumn)

Parameters

columnName string
newFeatureSourceColumn FeatureSourceColumn