C# Class Habanero.BO.TransactionalBusinessObject

Inheritance: ITransactional
Afficher le fichier Open project: Chillisoft/habanero Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

CanBePersisted() protected méthode

Checks whether the Wrapped business object can be Persisted.
protected CanBePersisted ( string &errMsg ) : bool
errMsg string
Résultat bool

CheckCanDelete() protected méthode

Checks whether the Wrapped business object can be deleted.
protected CheckCanDelete ( string &errMsg ) : bool
errMsg string
Résultat bool

CheckDuplicateIdentifier() protected méthode

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
Résultat void

CheckForConcurrencyErrors() protected méthode

Checks the underlying business object for any concurrency control errors before trying to commit to the datasource
protected CheckForConcurrencyErrors ( ) : void
Résultat void

IsNew() protected méthode

Whether the business object's state is new
protected IsNew ( ) : bool
Résultat bool

IsNewAndDeleted() protected méthode

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
Résultat bool

IsValid() protected méthode

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
Résultat bool

TransactionID() public méthode

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
Résultat string

TransactionalBusinessObject() protected méthode

Creates a TransactionalBusinessObject that wraps the IBusinessObject
protected TransactionalBusinessObject ( IBusinessObject businessObject ) : System
businessObject IBusinessObject
Résultat System

UpdateAsRolledBack() public méthode

updates the object as rolled back
public UpdateAsRolledBack ( ) : void
Résultat void

UpdateObjectBeforePersisting() protected méthode

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
Résultat void

UpdateStateAsCommitted() public méthode

Updates the business object as committed
public UpdateStateAsCommitted ( ) : void
Résultat void