C# Class com.Sconit.Persistence.SconitAdoTransaction

Wraps an ADO.NET IDbTransaction to implement the ITransaction interface.
Inheritance: ITransaction
Afficher le fichier Open project: Novthirteen/yfkey-scms

Méthodes publiques

Свойство Type Description
trans IDbTransaction

Méthodes publiques

Méthode Description
Begin ( ) : void
Begin ( IsolationLevel isolationLevel ) : void

Begins the IDbTransaction on the IDbConnection used by the ISession.

Commit ( ) : void

Commits the ITransaction by flushing the ISession and committing the IDbTransaction.

Dispose ( ) : void

Takes care of freeing the managed and unmanaged resources that this class is responsible for.

Enlist ( IDbCommand command ) : void

Enlist the IDbCommand in the current ITransaction.

This takes care of making sure the IDbCommand's Transaction property contains the correct IDbTransaction or if there is no Transaction for the ISession - ie BeginTransaction() not called.

This method may be called even when the transaction is disposed.

Rollback ( ) : void

Rolls back the ITransaction by calling the method Rollback on the underlying IDbTransaction.

SconitAdoTransaction ( ISessionImplementor session ) : System

Initializes a new instance of the AdoTransaction class.

Méthodes protégées

Méthode Description
Dispose ( bool isDisposing ) : void

Takes care of freeing the managed and unmanaged resources that this class is responsible for.

If this AdoTransaction is being Finalized (isDisposing==false) then make sure not to call any methods that could potentially bring this AdoTransaction back to life.

Private Methods

Méthode Description
AfterTransactionCompletion ( bool successful ) : void
CheckBegun ( ) : void
CheckNotDisposed ( ) : void

Method Details

Begin() public méthode

public Begin ( ) : void
Résultat void

Begin() public méthode

Begins the IDbTransaction on the IDbConnection used by the ISession.
/// Thrown if there is any problems encountered while trying to create /// the . ///
public Begin ( IsolationLevel isolationLevel ) : void
isolationLevel IsolationLevel
Résultat void

Commit() public méthode

Commits the ITransaction by flushing the ISession and committing the IDbTransaction.
/// Thrown if there is any exception while trying to call Commit() on /// the underlying . ///
public Commit ( ) : void
Résultat void

Dispose() public méthode

Takes care of freeing the managed and unmanaged resources that this class is responsible for.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Takes care of freeing the managed and unmanaged resources that this class is responsible for.
If this AdoTransaction is being Finalized (isDisposing==false) then make sure not to call any methods that could potentially bring this AdoTransaction back to life.
protected Dispose ( bool isDisposing ) : void
isDisposing bool Indicates if this AdoTransaction is being Disposed of or Finalized.
Résultat void

Enlist() public méthode

Enlist the IDbCommand in the current ITransaction.

This takes care of making sure the IDbCommand's Transaction property contains the correct IDbTransaction or if there is no Transaction for the ISession - ie BeginTransaction() not called.

This method may be called even when the transaction is disposed.

public Enlist ( IDbCommand command ) : void
command IDbCommand The to enlist in this Transaction.
Résultat void

Rollback() public méthode

Rolls back the ITransaction by calling the method Rollback on the underlying IDbTransaction.
/// Thrown if there is any exception while trying to call Rollback() on /// the underlying . ///
public Rollback ( ) : void
Résultat void

SconitAdoTransaction() public méthode

Initializes a new instance of the AdoTransaction class.
public SconitAdoTransaction ( ISessionImplementor session ) : System
session ISessionImplementor The the Transaction is for.
Résultat System

Property Details

trans public_oe property

public IDbTransaction trans
Résultat IDbTransaction