|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.jdbc.BrokeredConnection
public abstract class BrokeredConnection
This is a rudimentary connection that delegates EVERYTHING to Connection.
Field Summary | |
---|---|
private java.lang.String |
connString
|
(package private) BrokeredConnectionControl |
control
|
private boolean |
isClosed
|
private boolean |
stateAutoCommit
|
(package private) int |
stateHoldability
|
private int |
stateIsolationLevel
Maintain state as seen by this Connection handle, not the state of the underlying Connection it is attached to. |
private boolean |
stateReadOnly
|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
BrokeredConnection(BrokeredConnectionControl control)
|
Method Summary | |
---|---|
void |
addWarning(java.sql.SQLWarning w)
Add a SQLWarning to this Connection object. |
protected void |
checkIfClosed()
Checks if the connection is closed and throws an exception if it is. |
void |
clearLOBMapping()
Clear the HashMap of all entries. |
void |
clearWarnings()
|
void |
close()
|
void |
commit()
|
java.sql.Statement |
createStatement()
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.lang.String |
getCurrentSchemaName()
Obtain the name of the current schema. |
int |
getHoldability()
Get the holdability for statements created by this connection when holdability is not passed in. |
void |
getIsolationUptoDate()
Isolation level state in BrokeredConnection can get out of sync if the isolation is set using SQL rather than JDBC. |
java.lang.Object |
getLOBMapping(int key)
Get the LOB reference corresponding to the locator. |
java.sql.DatabaseMetaData |
getMetaData()
|
int |
getPrepareIsolation()
get the isolation level that is currently being used to prepare statements (used for network server) |
(package private) EngineConnection |
getRealConnection()
A little indirection for getting the real connection. |
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
|
java.sql.SQLWarning |
getWarnings()
|
boolean |
isClosed()
|
boolean |
isInGlobalTransaction()
Is this a global transaction |
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
BrokeredStatement |
newBrokeredStatement(BrokeredStatementControl statementControl)
|
abstract BrokeredCallableStatement |
newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql)
|
abstract BrokeredPreparedStatement |
newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql,
java.lang.Object generatedKeys)
|
(package private) void |
notifyException(java.sql.SQLException sqle)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Prepare statement with explicit holdability. |
void |
resetFromPool()
Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection). |
void |
rollback()
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setDrdaID(java.lang.String drdaID)
set the DrdaId for this connection. |
void |
setPrepareIsolation(int level)
Set the internal isolation level to use for preparing statements. |
void |
setReadOnly(boolean readOnly)
|
void |
setState(boolean complete)
Set the state of the underlying connection according to the state of this connection's view of state. |
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map map)
|
(package private) int |
statementHoldabilityCheck(int resultSetHoldability)
Check the result set holdability when creating a statement object. |
void |
syncState()
Sync up the state of the underlying connection with the state of this new handle. |
java.lang.String |
toString()
Get the string representation for this connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.sql.Connection |
---|
createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStruct, getClientInfo, getClientInfo, isValid, prepareCall, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setClientInfo, setClientInfo, setHoldability, setSavepoint, setSavepoint |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Field Detail |
---|
int stateHoldability
final BrokeredConnectionControl control
private boolean isClosed
private java.lang.String connString
private int stateIsolationLevel
private boolean stateReadOnly
private boolean stateAutoCommit
Constructor Detail |
---|
public BrokeredConnection(BrokeredConnectionControl control)
Method Detail |
---|
public final void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public final boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public final java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
java.sql.SQLException
public final void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
java.sql.SQLException
public final void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public final void close() throws java.sql.SQLException
close
in interface java.sql.Connection
java.sql.SQLException
public final boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
java.sql.SQLException
public final void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
public final void setReadOnly(boolean readOnly) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
java.sql.SQLException
public final boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
public final void setCatalog(java.lang.String catalog) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
java.sql.SQLException
public final java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
public final void setTransactionIsolation(int level) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public final int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public final java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
java.sql.SQLException
public final void setTypeMap(java.util.Map map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
java.sql.SQLException
final EngineConnection getRealConnection() throws java.sql.SQLException
java.sql.SQLException
final void notifyException(java.sql.SQLException sqle)
public void syncState() throws java.sql.SQLException
java.sql.SQLException
public void getIsolationUptoDate() throws java.sql.SQLException
java.sql.SQLException
public void setState(boolean complete) throws java.sql.SQLException
complete
- If true set the complete state of the underlying
Connection, otherwise set only the Connection related state (ie.
the non-transaction specific state).
java.sql.SQLException
public BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl) throws java.sql.SQLException
java.sql.SQLException
public abstract BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, java.lang.String sql, java.lang.Object generatedKeys) throws java.sql.SQLException
java.sql.SQLException
public abstract BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl, java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
public final void setDrdaID(java.lang.String drdaID)
setDrdaID
in interface EngineConnection
drdaID
- drdaID to be used for this connectionpublic boolean isInGlobalTransaction()
EngineConnection
isInGlobalTransaction
in interface EngineConnection
EngineConnection.isInGlobalTransaction()
public final void setPrepareIsolation(int level) throws java.sql.SQLException
setPrepareIsolation
in interface EngineConnection
level
- - internal isolation level
java.sql.SQLException
- See EmbedConnection#setPrepareIsolationpublic final int getPrepareIsolation() throws java.sql.SQLException
getPrepareIsolation
in interface EngineConnection
java.sql.SQLException
public final void addWarning(java.sql.SQLWarning w) throws java.sql.SQLException
addWarning
in interface EngineConnection
w
- Warning to be added, will be chained to any
existing warnings.
java.sql.SQLException
protected final void checkIfClosed() throws java.sql.SQLException
java.sql.SQLException
- if the connection is closedpublic java.lang.String toString()
toString
in class java.lang.Object
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
public final int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
getHoldability
in interface EngineConnection
java.sql.SQLException
final int statementHoldabilityCheck(int resultSetHoldability) throws java.sql.SQLException
java.sql.SQLException
public void clearLOBMapping() throws java.sql.SQLException
clearLOBMapping
in interface EngineConnection
java.sql.SQLException
public java.lang.Object getLOBMapping(int key) throws java.sql.SQLException
getLOBMapping
in interface EngineConnection
key
- the integer that represents the LOB locator value.
java.sql.SQLException
public java.lang.String getCurrentSchemaName() throws java.sql.SQLException
getCurrentSchemaName
in interface EngineConnection
java.sql.SQLException
public void resetFromPool() throws java.sql.SQLException
EngineConnection
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.
resetFromPool
in interface EngineConnection
java.sql.SQLException
EngineConnection
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |