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

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.

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.

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.

AddColumnBuffer

public Collection<FeatureSourceColumn> AddColumnBuffer { get; }

Property Value

Collection<FeatureSourceColumn>

DeleteColumnBuffer

public Collection<string> DeleteColumnBuffer { get; }

Property Value

Collection<String>

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:

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

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
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

AddColumn(FeatureSourceColumn)

public void AddColumn(FeatureSourceColumn featureSourceColumn)

Parameters

featureSourceColumn FeatureSourceColumn

DeleteColumn(String)

public void DeleteColumn(string columnName)

Parameters

columnName String

UpdateColumn(String, FeatureSourceColumn)

public void UpdateColumn(string columnName, FeatureSourceColumn newFeatureSourceColumn)

Parameters

columnName String

newFeatureSourceColumn FeatureSourceColumn