## org.firebirdsql.jdbc
Interface FirebirdConnection

All Superinterfaces:
  Connection, Wrapper

All Known Implementing Classes:
  AbstractConnection, FBConnection

    public interface FirebirdConnection

extends Connection

Extension of `Connection` interface providing access to Firebird specific features.

Author:
  Roman Rokytskyy

Field Summary
`static int` `TPB_CONCURRENCY`
`static int` `TPB_CONSISTENCY`
`static int` `TPB_NO_REC_VERSION`
`static int` `TPB_NOWAIT`
`static int` `TPB_READ`
`static int` `TPB_READ_COMMITTED`
`static int` `TPB_REC_VERSION`
`static int` `TPB_WAIT`
`static int` `TPB_WRITE`

Fields inherited from interface java.sql.Connection
`TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE`

Method Summary
`Blob` `createBlob()` Create Blob object.
`TransactionParameterBuffer` `createTransactionParameterBuffer()` Create new instance of `TransactionParameterBuffer`.
`int` `getHoldability()` Retrieves the current holdability of `ResultSet` objects created using this `Connection` object.
`String` `getIscEncoding()` Get current ISC encoding.
`TransactionParameterBuffer` `getTransactionParameters(int isolationLevel)` Get transaction parameters for the specified transaction isolation level.
`void` `releaseSavepoint(FirebirdSavepoint savepoint)` Removes the given `FirebirdSavepoint` object from the current transaction.
`void` `rollback(FirebirdSavepoint savepoint)` Undoes all changes made after the given `FirebirdSavepoint` object was set.
`FirebirdSavepoint` `setFirebirdSavepoint()` Creates an unnamed savepoint in the current transaction and returns the new `FirebirdSavepoint` object that represents it.
`FirebirdSavepoint` `setFirebirdSavepoint(String name)` Creates a named savepoint in the current transaction and returns the new `FirebirdSavepoint` object that represents it.
`void` `setHoldability(int holdability)` Changes the holdability of `ResultSet` objects created using this `Connection` object to the given holdability.
`void` `setTransactionParameters(int isolationLevel, int[] parameters)` Deprecated. use `setTransactionParameters(int, TransactionParameterBuffer)` instead.
`void` `setTransactionParameters(int isolationLevel, TransactionParameterBuffer tpb)` Set transaction parameters for the specified transaction isolation level.
`void` `setTransactionParameters(TransactionParameterBuffer tpb)` Set transaction parameters for the next transactions.

Methods inherited from interface java.sql.Connection

`clearWarnings, close, commit, createArrayOf, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap`

Methods inherited from interface java.sql.Wrapper
`isWrapperFor, unwrap`

Field Detail

### TPB_READ_COMMITTED

    static final int TPB_READ_COMMITTED

See Also:
  Constant Field Values

### TPB_CONCURRENCY

    static final int TPB_CONCURRENCY

See Also:
  Constant Field Values

### TPB_CONSISTENCY

    static final int TPB_CONSISTENCY

See Also:
  Constant Field Values

### TPB_READ

    static final int TPB_READ

See Also:
  Constant Field Values

### TPB_WRITE

    static final int TPB_WRITE

See Also:
  Constant Field Values

### TPB_WAIT

    static final int TPB_WAIT

See Also:
  Constant Field Values

### TPB_NOWAIT

    static final int TPB_NOWAIT

See Also:
  Constant Field Values

### TPB_REC_VERSION

    static final int TPB_REC_VERSION

See Also:
  Constant Field Values

### TPB_NO_REC_VERSION

    static final int TPB_NO_REC_VERSION

See Also:
  Constant Field Values

Method Detail

### createBlob

    Blob createBlob()
                    throws SQLException

  Create Blob object.

  Specified by:
    `createBlob` in interface `Connection`
  Returns:
    instance of `FirebirdBlob`.
  Throws:
    `SQLException` - if something went wrong.

### getIscEncoding

    String getIscEncoding()
                          throws SQLException

  Get current ISC encoding.

  Returns:
    current ISC encoding.
  Throws:
    `SQLException`

### setTransactionParameters

    void setTransactionParameters(int isolationLevel,
                                  int[] parameters)
                                  throws SQLException

  Deprecated. use `setTransactionParameters(int, TransactionParameterBuffer)` instead.

  Set transaction parameters for the specified isolation level. They will take effect only on the newly started transaction.

  Parameters:
    `isolationLevel` - JDBC isolation level.
    `parameters` - array of TPB parameters, see all TPB_* constants.
  Throws:
    `SQLException` - if specified transaction parameters cannot be set.

### getTransactionParameters

    TransactionParameterBuffer getTransactionParameters(int isolationLevel)
                                                        throws SQLException

  Get transaction parameters for the specified transaction isolation level.

  Parameters:
    `isolationLevel` - isolation level defined in the `Connection` interface.
  Returns:
    instance of `TransactionParameterBuffer` containing current transaction parameters.
  Throws:
    `SQLException` - if error occured obtaining transaction parameters.

### createTransactionParameterBuffer

    TransactionParameterBuffer createTransactionParameterBuffer()
                                                                throws SQLException

  Create new instance of `TransactionParameterBuffer`.

  Returns:
    empty instance of `TransactionParameterBuffer`.
  Throws:
    `SQLException` - if error occured during this operation.

### setTransactionParameters

    void setTransactionParameters(int isolationLevel,
                                  TransactionParameterBuffer tpb)
                                  throws SQLException

  Set transaction parameters for the specified transaction isolation level. This method replaces the default TPB mapping with the specified one, changes will be effective from the next transaction start.

  Parameters:
    `isolationLevel` - isolation level defined in the `Connection` interface.
    `tpb` - instance of `TransactionParameterBuffer` with parameters to set.
  Throws:
    `SQLException` - if error occured during this operation.

### setTransactionParameters

    void setTransactionParameters(TransactionParameterBuffer tpb)
                                  throws SQLException

  Set transaction parameters for the next transactions. This method does not change the TPB mapping, but replaces the mapping for the current transaction isolation until `Connection.setTransactionIsolation(int)` is called.

  Method cannot be called when transaction has already started.

  Parameters:
    `tpb` - instance of `TransactionParameterBuffer` with new transaction parameters.
  Throws:
    `SQLException` - if method is called within a transaction.

### setFirebirdSavepoint

    FirebirdSavepoint setFirebirdSavepoint()
                                           throws SQLException

  Creates an unnamed savepoint in the current transaction and returns the new `FirebirdSavepoint` object that represents it.

  This method corresponds to the `Connection.setSavepoint()` method in JDBC 3.0.

  Returns:
    instance of `FirebirdSavepoint`
  Throws:
    `SQLException` - if a an error occured.

### setFirebirdSavepoint

    FirebirdSavepoint setFirebirdSavepoint(String name)
                                           throws SQLException

  Creates a named savepoint in the current transaction and returns the new `FirebirdSavepoint` object that represents it.

  This method corresponds to the `Connection.setSavepoint(String)` method in JDBC 3.0.

  Parameters:
    `name` - a `String` containing the name of the savepoint
  Returns:
    instance of `FirebirdSavepoint`
  Throws:
    `SQLException` - if a an error occured.

### rollback

    void rollback(FirebirdSavepoint savepoint)
                  throws SQLException

  Undoes all changes made after the given `FirebirdSavepoint` object was set.

  This method corresponds to the `Connection.rollback(Savepoint)` method in JDBC 3.0.

  Parameters:
    `savepoint` - the `FirebirdSavepoint` object to roll back to
  Throws:
    `SQLException` - if a database access error occurs.

### releaseSavepoint

    void releaseSavepoint(FirebirdSavepoint savepoint)
                          throws SQLException

  Removes the given `FirebirdSavepoint` object from the current transaction. Any reference to the savepoint after it have been removed will cause an `SQLException` to be thrown.

  This method corresponds to the `Connection.releaseSavepoint(Savepoint)` method in JDBC 3.0.

  Parameters:
    `savepoint` - the `FirebirdSavepoint` object to be removed
  Throws:
    `SQLException` - if a database access error occurs

### setHoldability

    void setHoldability(int holdability)
                        throws SQLException

  Changes the holdability of `ResultSet` objects created using this `Connection` object to the given holdability.

  Method copied from the JDBC 3.0 specification.

  Specified by:
    `setHoldability` in interface `Connection`
  Parameters:
    `holdability` - a `ResultSet` holdability constant; one of `ResultSet.HOLD_CURSORS_OVER_COMMIT` or `ResultSet.CLOSE_CURSORS_AT_COMMIT`
  Throws:
    `SQLException` - if a database access occurs, the given parameter is not a `ResultSet` constant indicating holdability, or the given holdability is not supported
  Since:
    1.4
  See Also:
    `getHoldability()`, `ResultSet`

### getHoldability

    int getHoldability()
                       throws SQLException

  Retrieves the current holdability of `ResultSet` objects created using this `Connection` object.

  Method copied from the JDBC 3.0 specification.

  Specified by:
    `getHoldability` in interface `Connection`
  Returns:
    the holdability, one of `ResultSet.HOLD_CURSORS_OVER_COMMIT` or `ResultSet.CLOSE_CURSORS_AT_COMMIT`
  Throws:
    `SQLException` - if a database access occurs
  Since:
    1.4
  See Also:
    `setHoldability(int)`, `ResultSet`

Copyright © 2001-2010. All Rights Reserved.