C# Класс Habanero.BO.TransactionalBusinessObject

Наследование: ITransactional
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
TransactionID ( ) : string

This is the ID that uniquely identifies this item of the transaction. This must be the same for the lifetime of the transaction object. This assumption is relied upon for certain optimisations in the Transaction Comitter.

UpdateAsRolledBack ( ) : void

updates the object as rolled back

UpdateStateAsCommitted ( ) : void

Updates the business object as committed

Защищенные методы

Метод Описание
CanBePersisted ( string &errMsg ) : bool

Checks whether the Wrapped business object can be Persisted.

CheckCanDelete ( string &errMsg ) : bool

Checks whether the Wrapped business object can be deleted.

CheckDuplicateIdentifier ( List pendingTransactions, List errorMessages ) : void

returns true if there is already an object in the database with the same primary identifier (primary key) or with the same alternate identifier (alternate key)

CheckForConcurrencyErrors ( ) : void

Checks the underlying business object for any concurrency control errors before trying to commit to the datasource

IsNew ( ) : bool

Whether the business object's state is new

IsNewAndDeleted ( ) : bool

returns true if the underlying business object is new and deleted. I.e. it is in an invalid state which means that it has already been deleted from the database.

IsValid ( string &invalidReason ) : bool

Indicates whether all of the property values are valid

TransactionalBusinessObject ( IBusinessObject businessObject ) : System

Creates a TransactionalBusinessObject that wraps the IBusinessObject

UpdateObjectBeforePersisting ( ITransactionCommitter transactionCommitter ) : void

Executes any custom code required by the business object before it is persisted to the database. This has the additionl capability of creating or updating other business objects and adding these to the transaction committer.

Приватные методы

Метод Описание
CheckDuplicatePrimaryKey ( BusinessObject bo, List pendingTransactions, IPrimaryKey primaryKey, List errorMessages ) : void
GetClassDisplayName ( BusinessObject bo ) : string
GetDuplicateKeyCriteria ( Criteria keyCriteria, Criteria primaryKeyCriteria ) : Criteria
GetDuplicateObjectErrMsg ( IBOKey boKey, string classDisplayName ) : string

GetDuplicateObjects ( BusinessObject bo, List pendingTransactions, Criteria keyCriteria ) : IBusinessObjectCollection

Описание методов

CanBePersisted() защищенный Метод

Checks whether the Wrapped business object can be Persisted.
protected CanBePersisted ( string &errMsg ) : bool
errMsg string
Результат bool

CheckCanDelete() защищенный Метод

Checks whether the Wrapped business object can be deleted.
protected CheckCanDelete ( string &errMsg ) : bool
errMsg string
Результат bool

CheckDuplicateIdentifier() защищенный Метод

returns true if there is already an object in the database with the same primary identifier (primary key) or with the same alternate identifier (alternate key)
protected CheckDuplicateIdentifier ( List pendingTransactions, List errorMessages ) : void
pendingTransactions List
errorMessages List
Результат void

CheckForConcurrencyErrors() защищенный Метод

Checks the underlying business object for any concurrency control errors before trying to commit to the datasource
protected CheckForConcurrencyErrors ( ) : void
Результат void

IsNew() защищенный Метод

Whether the business object's state is new
protected IsNew ( ) : bool
Результат bool

IsNewAndDeleted() защищенный Метод

returns true if the underlying business object is new and deleted. I.e. it is in an invalid state which means that it has already been deleted from the database.
protected IsNewAndDeleted ( ) : bool
Результат bool

IsValid() защищенный Метод

Indicates whether all of the property values are valid
protected IsValid ( string &invalidReason ) : bool
invalidReason string A string to modify with a reason /// for any invalid values
Результат bool

TransactionID() публичный Метод

This is the ID that uniquely identifies this item of the transaction. This must be the same for the lifetime of the transaction object. This assumption is relied upon for certain optimisations in the Transaction Comitter.
public TransactionID ( ) : string
Результат string

TransactionalBusinessObject() защищенный Метод

Creates a TransactionalBusinessObject that wraps the IBusinessObject
protected TransactionalBusinessObject ( IBusinessObject businessObject ) : System
businessObject IBusinessObject
Результат System

UpdateAsRolledBack() публичный Метод

updates the object as rolled back
public UpdateAsRolledBack ( ) : void
Результат void

UpdateObjectBeforePersisting() защищенный Метод

Executes any custom code required by the business object before it is persisted to the database. This has the additionl capability of creating or updating other business objects and adding these to the transaction committer.
protected UpdateObjectBeforePersisting ( ITransactionCommitter transactionCommitter ) : void
transactionCommitter ITransactionCommitter the transaction committer that is executing the transaction
Результат void

UpdateStateAsCommitted() публичный Метод

Updates the business object as committed
public UpdateStateAsCommitted ( ) : void
Результат void