C# Class com.Sconit.Persistence.SconitAdoTransaction

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

Public Properties

Property Type Description
trans IDbTransaction

Public Methods

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

Protected Methods

Method 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

Method Description
AfterTransactionCompletion ( bool successful ) : void
CheckBegun ( ) : void
CheckNotDisposed ( ) : void

Method Details

Begin() public method

public Begin ( ) : void
return void

Begin() public method

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

Commit() public method

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

Dispose() public method

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

Dispose() protected method

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.
return void

Enlist() public method

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.
return void

Rollback() public method

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

SconitAdoTransaction() public method

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

Property Details

trans public_oe property

public IDbTransaction trans
return IDbTransaction