org.firebirdsql.jdbc
Class InternalTransactionCoordinator.AutoCommitCoordinator

java.lang.Object
  extended byorg.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator
      extended byorg.firebirdsql.jdbc.InternalTransactionCoordinator.AutoCommitCoordinator
All Implemented Interfaces:
FBObjectListener.BlobListener, FBObjectListener.StatementListener
Enclosing class:
InternalTransactionCoordinator

public static class InternalTransactionCoordinator.AutoCommitCoordinator
extends InternalTransactionCoordinator.AbstractTransactionCoordinator


Field Summary
 
Fields inherited from class org.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator
connection, localTransaction, statements
 
Constructor Summary
InternalTransactionCoordinator.AutoCommitCoordinator(AbstractConnection connection, FirebirdLocalTransaction localTransaction)
           
 
Method Summary
 void commit()
           
 void ensureTransaction()
           
 void executionCompleted(FirebirdBlob blob)
          Notify listener that execution of some BLOB operation had been completed.
 void executionStarted(AbstractStatement stmt)
          Notify listener that statement execution is being started.
 void executionStarted(FirebirdBlob blob)
          Notify listener that execution of some BLOB operation had been started.
 void rollback()
           
 void statementClosed(AbstractStatement stmt)
          Notify the listener that statement was closed.
 void statementCompleted(AbstractStatement stmt)
          Notify the listener that statement is completed.
 void statementCompleted(AbstractStatement stmt, boolean success)
          Notify the listener that statement is completed and tell whether execution was successfull or not.
 
Methods inherited from class org.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator
completeStatements, getConnection, getStatements, setStatements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalTransactionCoordinator.AutoCommitCoordinator

public InternalTransactionCoordinator.AutoCommitCoordinator(AbstractConnection connection,
                                                            FirebirdLocalTransaction localTransaction)
Parameters:
connection -
localTransaction -
Method Detail

executionStarted

public void executionStarted(AbstractStatement stmt)
                      throws java.sql.SQLException
Description copied from interface: FBObjectListener.StatementListener
Notify listener that statement execution is being started.

Parameters:
stmt - statement that is being executed.
Throws:
java.sql.SQLException - if something went wrong.

ensureTransaction

public void ensureTransaction()
                       throws java.sql.SQLException
Specified by:
ensureTransaction in class InternalTransactionCoordinator.AbstractTransactionCoordinator
Throws:
java.sql.SQLException

statementClosed

public void statementClosed(AbstractStatement stmt)
                     throws java.sql.SQLException
Description copied from interface: FBObjectListener.StatementListener
Notify the listener that statement was closed.

Parameters:
stmt - statement that was closed.
Throws:
java.sql.SQLException

statementCompleted

public void statementCompleted(AbstractStatement stmt)
                        throws java.sql.SQLException
Description copied from interface: FBObjectListener.StatementListener
Notify the listener that statement is completed. This is shortcut method for statementCompleted(AbstractStatement, true).

Parameters:
stmt - statement that was completed.
Throws:
java.sql.SQLException

statementCompleted

public void statementCompleted(AbstractStatement stmt,
                               boolean success)
                        throws java.sql.SQLException
Description copied from interface: FBObjectListener.StatementListener
Notify the listener that statement is completed and tell whether execution was successfull or not.

Parameters:
stmt - statement that was completed.
success - true if completion was successfull.
Throws:
java.sql.SQLException - if an error occured.

executionCompleted

public void executionCompleted(FirebirdBlob blob)
                        throws java.sql.SQLException
Description copied from interface: FBObjectListener.BlobListener
Notify listener that execution of some BLOB operation had been completed.

Parameters:
blob - instance of FirebirdBlob that caused this event.
Throws:
java.sql.SQLException - if something went wrong.

executionStarted

public void executionStarted(FirebirdBlob blob)
                      throws java.sql.SQLException
Description copied from interface: FBObjectListener.BlobListener
Notify listener that execution of some BLOB operation had been started.

Parameters:
blob - instance of FirebirdBlob that caused this event.
Throws:
java.sql.SQLException - if something went wrong.

commit

public void commit()
            throws java.sql.SQLException
Specified by:
commit in class InternalTransactionCoordinator.AbstractTransactionCoordinator
Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
Specified by:
rollback in class InternalTransactionCoordinator.AbstractTransactionCoordinator
Throws:
java.sql.SQLException


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