Package org.firebirdsql.jdbc

## Class InternalTransactionCoordinator.AbstractTransactionCoordinator

- java.lang.Object
- - org.firebirdsql.jdbc.InternalTransactionCoordinator.AbstractTransactionCoordinator

All Implemented Interfaces:
  `FBObjectListener.BlobListener`, `FBObjectListener.StatementListener`

Enclosing class:
  InternalTransactionCoordinator

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

### Field Summary

Fields
`protected FBConnection` `connection`
`protected FBLocalTransaction` `localTransaction`
`protected java.util.Collection<FBStatement>` `statements`

### Constructor Summary

Constructors
`protected` `AbstractTransactionCoordinator​(FBConnection connection, FBLocalTransaction localTransaction)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `commit()`
`protected void` `completeStatements​(CompletionReason reason)`
`void` `ensureTransaction()`
`FBConnection` `getConnection()` Get the connection which owns this coordinator.
`protected java.util.Collection<FBStatement>` `getStatements()`
`abstract void` `rollback()`
`protected void` `setStatements​(java.util.Collection<FBStatement> statements)`
`void` `statementCompleted​(FBStatement stmt)` Notify the listener that statement is completed.

### 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.BlobListener

`executionCompleted, executionStarted`

### Methods inherited from interface org.firebirdsql.jdbc.FBObjectListener.StatementListener

`executionStarted, statementClosed, statementCompleted`

### Field Detail

#### localTransaction

    protected final FBLocalTransaction localTransaction

#### connection

    protected final FBConnection connection

#### statements

    protected final java.util.Collection<FBStatement> statements

### Constructor Detail

#### AbstractTransactionCoordinator

    protected AbstractTransactionCoordinator​(FBConnection connection,
                                             FBLocalTransaction localTransaction)

### Method Detail

#### getConnection

    public final FBConnection getConnection()
                                     throws java.sql.SQLException

Get the connection which owns this coordinator.

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

#### getStatements

    protected final java.util.Collection<FBStatement> getStatements()

#### setStatements

    protected final void setStatements​(java.util.Collection<FBStatement> statements)

#### completeStatements

    protected void completeStatements​(CompletionReason reason)
                               throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### ensureTransaction

    public 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`

#### statementCompleted

    public final void statementCompleted​(FBStatement 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)`.

Specified by:
  `statementCompleted` in interface `FBObjectListener.StatementListener`
Parameters:
  `stmt` - statement that was completed.
Throws:
  `java.sql.SQLException`