org.firebirdsql.jdbc
Class InternalTransactionCoordinator.AbstractTransactionCoordinator

java.lang.Object
  extended by org.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator
All Implemented Interfaces:
FBObjectListener.BlobListener, FBObjectListener.StatementListener
Direct Known Subclasses:
InternalTransactionCoordinator.AutoCommitCoordinator, InternalTransactionCoordinator.LocalTransactionCoordinator, InternalTransactionCoordinator.MetaDataTransactionCoordinator
Enclosing class:
InternalTransactionCoordinator

public abstract static class InternalTransactionCoordinator.AbstractTransactionCoordinator
extends java.lang.Object
implements FBObjectListener.StatementListener, FBObjectListener.BlobListener


Field Summary
protected  AbstractConnection connection
           
protected  FirebirdLocalTransaction localTransaction
           
protected  java.util.Collection statements
           
 
Constructor Summary
protected InternalTransactionCoordinator.AbstractTransactionCoordinator(AbstractConnection connection, FirebirdLocalTransaction localTransaction)
           
 
Method Summary
abstract  void commit()
           
protected  void completeStatements()
           
abstract  void ensureTransaction()
           
 AbstractConnection getConnection()
          Get the connection which owns this coordinator.
protected  java.util.Collection getStatements()
           
abstract  void rollback()
           
protected  void setStatements(java.util.Collection statements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.firebirdsql.jdbc.FBObjectListener.StatementListener
executionStarted, statementClosed, statementCompleted, statementCompleted
 
Methods inherited from interface org.firebirdsql.jdbc.FBObjectListener.BlobListener
executionCompleted, executionStarted
 

Field Detail

localTransaction

protected FirebirdLocalTransaction localTransaction

connection

protected AbstractConnection connection

statements

protected java.util.Collection statements
Constructor Detail

InternalTransactionCoordinator.AbstractTransactionCoordinator

protected InternalTransactionCoordinator.AbstractTransactionCoordinator(AbstractConnection connection,
                                                                        FirebirdLocalTransaction localTransaction)
Method Detail

getConnection

public AbstractConnection getConnection()
                                 throws java.sql.SQLException
Get the connection which owns this coordinator.

Specified by:
getConnection in interface FBObjectListener.StatementListener
Returns:
instance of AbstractConnection
Throws:
java.sql.SQLException - if something went wrong.

getStatements

protected java.util.Collection getStatements()

setStatements

protected void setStatements(java.util.Collection statements)

completeStatements

protected void completeStatements()
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

ensureTransaction

public abstract void ensureTransaction()
                                throws java.sql.SQLException
Throws:
java.sql.SQLException

commit

public abstract void commit()
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

rollback

public abstract void rollback()
                       throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2001 David Jencks and other authors. All rights reserved.