Click or drag to resize

BcfTransaction Class

Represents a transaction.
Inheritance Hierarchy
SystemObject
  CalculationWorks.BusinessModelBcfTransaction

Namespace:  CalculationWorks.BusinessModel
Assembly:  CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntax
public class BcfTransaction : IBcfTransactionData

The BcfTransaction type exposes the following members.

Constructors
  NameDescription
Protected methodCode exampleBcfTransaction
Creates a new instance. It is recommended to use BcfDataSetBeginTransaction to create a transaction. The constructor should only be used in CreateTransaction(BcfTransactionBuilder).
Top
Properties
  NameDescription
Public propertyDataSet
Gets the BcfDataSet the transaction belongs to.
Public propertyEnforceConstraints
Gets a value indicating whether unique-key, foreign-key and relation constraints will be enforced after each update or not.
Public propertyHasDirtyItems Obsolete.
Gets a value indicating whether this instance has outstanding calculations (computed value cells and rule cells).
Public propertyHasOutdatedCells Obsolete.
Gets a value indicating whether this instance has outdated (computed) cells.
Public propertyHasOutdatedFaults
Gets a value indicating whether this instance has outdated faults.If RecalculateAllRules is true the property will also return true, even when there are no rows with rules cells in dataset.
Public propertyHasOutdatedItems
Gets a value indicating whether this instance has outstanding calculations (computed value cells and rule cells).
Public propertyHasOutdatedOptimizerCells
Gets a value indicating whether this instance has outdated cells of optimizer columns. If RecalculateAllOptimizers is true the property will also return true, even when there are no rows with computed optimizer cells in dataset.
Public propertyHasOutdatedValueCells
Gets a value indicating whether this instance has outdated cells of computed non-optimizer columns. If RecalculateAllValues is true the property will also return true, even when there are no rows with computed value cells in dataset.
Public propertyInfo
Gets or sets custom information about the BcfTransaction.
Public propertyIsAlive
Gets a value indicating whether this instance is in use; as active transaction or in undo or redo.
Public propertyIsCommitted
Gets a value indicating whether this instance is committed.
Public propertyIsCurrent
Gets a value indicating whether this instance is current.
Public propertyIsInDumbMode
Gets a value indicating whether this instance is in dumbmode (EnterDumbMode).
Public propertyIsRolledBack
Gets a value indicating whether this instance is rolled back.
Public propertyIsSubTransaction
Gets a value indicating whether this instance is a sub transaction.
Public propertyItemCount
Number of transactions compensation items.
Public propertyMicroTransactionMode
Gets or sets the mode for micro-transactions.
Public propertyMustRollback
Gets a value indicating whether the transaction caused an invalid state and must be rolled back.
Public propertyName
Gets or sets the transaction name.
Public propertyRecalculateAllOptimizers
Gets a value indicating whether all cells of optimizer columns should be recomputed on next Compute(Boolean).
Public propertyRecalculateAllRules
Gets a value indicating whether all rules should be executed on next Compute(Boolean) (computeRules = ) independent of cell state evaluation.
Public propertyRecalculateAllValues
Gets a value indicating whether all cells (except of optimizer columns) should be recomputed on next Compute(Boolean).
Public propertyTriggersEnabled
Gets or sets a value indicating whether triggers are enabled.
Top
Methods
  NameDescription
Public methodAcceptValuesAsResults
Causes the transaction to drop the list of computed cells needing re-calculation.
Protected methodCode exampleAdd
Adds the item to the transactions compensation repository.
Public methodBeginSubTransaction(BcfTransactionBuilder)
Creates and returns a sub transaction.
Public methodBeginSubTransaction(String, NullableBoolean)
Creates and returns a sub transaction.
Public methodCommit
Commits all changes made in this transaction.
Public methodCompute
Executes all necessary operations to bring the BcfCell.Values up to date.
Public methodComputePartial(BcfCell)
Executes all necessary operations to bring the BcfCell.Values of specified cells up to date.
Public methodComputePartial(IEnumerableBcfCell, IEnumerableBcfFaultId)
Executes all necessary operations to bring the BcfCell.Values of specified cells and BcfFaults of specified faults up to date.
Public methodCreateChangeSet
Creates a BcfChangeSet containing changes of this transaction (committed sub-transactions inclusive).
Public methodCurrentCompensationItems
Creates an array of current compensation items.
Public methodCode exampleEnterDumbMode

Sets all computed cells and faults to 'must recompute' and disables observing data until next call of Compute(Boolean) (implicit when main-transaction commits).

Call EnterDumbMode when load data into an empty BcfDataSet to speed up loading or if you want to force complete recalculation.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetOutdatedCells Obsolete.
Gets an array of outdated (computed) cells. Result may contain cells of optimizer columns.
Public methodGetOutdatedFaultIds
Gets the faults identified as outdated by change tracking (IsOutdated). The RowState of cells may differ from Valid.
Public methodGetOutdatedFaults Obsolete.
Gets an array of outdated (computed) cells.
Public methodGetOutdatedOptimizerCells
Gets the cells identified as outdated by change tracking (IsOutdated). The result will ONLY contain cells of optimizer generated columns. The RowState of cells may differ from Valid.
Public methodGetOutdatedValueCells
Gets the cells identified as outdated by change tracking (IsOutdated). The result will NOT contain cells of optimizer generated columns. The RowState of cells may differ from Valid.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodCode exampleOnBeforeCommitComplete
If using file-based undo here is the last chance for updates on Info before it is serialized.
Protected methodOnCommit
Protected methodCode exampleOnCommitComplete
Called when Commit executes. If using file-based undo the transaction is now persisted.
Protected methodCode exampleOnDiscard
Called when the transaction goes out of scope.
Protected methodCode exampleOnRollback
Called when a rollback will be performed.
Protected methodCode exampleOnRollbackComplete
Called after rollback was executed.
Public methodRollback
Discards the transaction and restores the data from state before the transaction started.
Public methodSetEnforceConstraints
Sets a value indicating whether constraints will be enforced or not.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Any update operation on a data object is wrapped in a transaction. Setting a value or adding a row will create a transaction, execute the operation and commit the transaction. To improve performance and get a nice undo repository when more than one cell update is required, it is recommended to use transactions explicit.

See Also