org.apache.derby.iapi.jdbc
Interface EngineConnection

All Superinterfaces:
java.sql.Connection, java.sql.Wrapper
All Known Implementing Classes:
BrokeredConnection, BrokeredConnection30, BrokeredConnection40, EmbedConnection, EmbedConnection30, EmbedConnection40

public interface EngineConnection
extends java.sql.Connection

Additional methods the embedded engine exposes on its Connection object implementations. An internal api only, mainly for the network server. Allows consistent interaction between EmbedConnections and BrokeredConnections.


Field Summary
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Method Summary
 void addWarning(java.sql.SQLWarning newWarning)
          Add a SQLWarning to this Connection object.
 void clearLOBMapping()
          Clear the HashTable of all entries.
 java.lang.String getCurrentSchemaName()
          Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backing
 int getHoldability()
          Get the holdability of the connection.
 java.lang.Object getLOBMapping(int key)
          Get the LOB reference corresponding to the locator.
 int getPrepareIsolation()
          Return prepare isolation
 boolean isInGlobalTransaction()
          Is this a global transaction
 void resetFromPool()
          Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).
 void setDrdaID(java.lang.String drdaID)
          Set the DRDA identifier for this connection.
 void setPrepareIsolation(int level)
          Set the transaction isolation level that will be used for the next prepare.
 
Methods inherited from interface java.sql.Connection
clearWarnings, close, commit, createArrayOf, createBlob, 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, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Method Detail

setDrdaID

void setDrdaID(java.lang.String drdaID)
Set the DRDA identifier for this connection.


isInGlobalTransaction

boolean isInGlobalTransaction()
Is this a global transaction

Returns:
true if this is a global XA transaction

setPrepareIsolation

void setPrepareIsolation(int level)
                         throws java.sql.SQLException
Set the transaction isolation level that will be used for the next prepare. Used by network server to implement DB2 style isolation levels. Note the passed in level using the Derby constants from ExecutionContext and not the JDBC constants from java.sql.Connection.

Parameters:
level - Isolation level to change to. level is the DB2 level specified in the package names which happen to correspond to our internal levels. If level == ExecutionContext.UNSPECIFIED_ISOLATION, the statement won't be prepared with an isolation level.
Throws:
java.sql.SQLException

getPrepareIsolation

int getPrepareIsolation()
                        throws java.sql.SQLException
Return prepare isolation

Throws:
java.sql.SQLException

getHoldability

int getHoldability()
                   throws java.sql.SQLException
Get the holdability of the connection. Identical to JDBC 3.0 method, to allow holdabilty to be supported in JDK 1.3 by the network server, e.g. when the client is jdk 1.4 or above. Can be removed once JDK 1.3 is no longer supported.

Specified by:
getHoldability in interface java.sql.Connection
Throws:
java.sql.SQLException

addWarning

void addWarning(java.sql.SQLWarning newWarning)
                throws java.sql.SQLException
Add a SQLWarning to this Connection object.

Parameters:
newWarning - Warning to be added, will be chained to any existing warnings.
Throws:
java.sql.SQLException

clearLOBMapping

void clearLOBMapping()
                     throws java.sql.SQLException
Clear the HashTable of all entries. Called when a commit or rollback of the transaction happens.

Throws:
java.sql.SQLException

getLOBMapping

java.lang.Object getLOBMapping(int key)
                               throws java.sql.SQLException
Get the LOB reference corresponding to the locator.

Parameters:
key - the integer that represents the LOB locator value.
Returns:
the LOB Object corresponding to this locator.
Throws:
java.sql.SQLException

getCurrentSchemaName

java.lang.String getCurrentSchemaName()
                                      throws java.sql.SQLException
Obtain the name of the current schema, so that the NetworkServer can use it for piggy-backing

Returns:
the current schema name
Throws:
java.sql.SQLException

resetFromPool

void resetFromPool()
                   throws java.sql.SQLException
Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection).

Note that resetting the transaction isolation level is not performed as part of this method. Temporary tables, IDENTITY_VAL_LOCAL and current schema are reset.

Throws:
java.sql.SQLException

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.