|
|||||||||
| 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 class BrokeredConnection
This is a rudimentary connection that delegates EVERYTHING to Connection.
| Field Summary | |
|---|---|
private java.lang.String |
connString
|
(package private) BrokeredConnectionControl |
control
|
private ExceptionFactory |
exceptionFactory
Exception factory for the underlying connection. |
protected 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. |
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)
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.lang.String |
getCurrentSchemaName()
Obtain the name of the current schema. |
ExceptionFactory |
getExceptionFactory()
Return the exception factory for the underlying connection. |
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. |
java.lang.String |
getSchema()
Get the name of the current schema. |
int |
getTransactionIsolation()
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
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)
|
BrokeredCallableStatement |
newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql)
|
BrokeredPreparedStatement |
newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql,
java.lang.Object generatedKeys)
|
(package private) java.sql.SQLException |
noCurrentConnection()
Generate an exception reporting that there is no current connection. |
(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.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
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. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
resetFromPool()
Resets the connection before it is returned from a PooledConnection to a new application request (wrapped by a BrokeredConnection). |
void |
rollback()
|
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setDrdaID(java.lang.String drdaID)
set the DrdaId for this connection. |
void |
setHoldability(int holdability)
|
void |
setPrepareIsolation(int level)
Set the internal isolation level to use for preparing statements. |
void |
setReadOnly(boolean readOnly)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setSchema(java.lang.String schemaName)
Set the default schema for the Connection. |
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<java.lang.String,java.lang.Class<?>> 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, createStruct, getClientInfo, getClientInfo, isValid, setClientInfo, setClientInfo |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Field Detail |
|---|
int stateHoldability
final BrokeredConnectionControl control
protected boolean isClosed
private java.lang.String connString
private final ExceptionFactory exceptionFactory
private int stateIsolationLevel
private boolean stateReadOnly
private boolean stateAutoCommit
| Constructor Detail |
|---|
public BrokeredConnection(BrokeredConnectionControl control)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public final void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public final boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public final java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLException
public final void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLException
public final void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public final void close()
throws java.sql.SQLException
close in interface java.sql.Connectionjava.sql.SQLException
public final boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLException
public final void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLException
public final void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionjava.sql.SQLException
public final boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLException
public final void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLException
public final java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLException
public final void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException
public final int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.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.Connectionjava.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.Connectionjava.sql.SQLException
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLException
public final void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLException
public final void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLException
public final void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLException
public final void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLException
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionfinal java.sql.SQLException noCurrentConnection()
final EngineConnection getRealConnection()
throws java.sql.SQLException
java.sql.SQLExceptionfinal 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 BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql,
java.lang.Object generatedKeys)
throws java.sql.SQLException
java.sql.SQLException
public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql)
throws java.sql.SQLException
java.sql.SQLExceptionpublic final void setDrdaID(java.lang.String drdaID)
setDrdaID in interface EngineConnectiondrdaID - drdaID to be used for this connectionpublic boolean isInGlobalTransaction()
EngineConnection
isInGlobalTransaction in interface EngineConnectionEngineConnection.isInGlobalTransaction()
public final void setPrepareIsolation(int level)
throws java.sql.SQLException
setPrepareIsolation in interface EngineConnectionlevel - - internal isolation level
java.sql.SQLException - See EmbedConnection#setPrepareIsolation
public final int getPrepareIsolation()
throws java.sql.SQLException
getPrepareIsolation in interface EngineConnectionjava.sql.SQLException
public final void addWarning(java.sql.SQLWarning w)
throws java.sql.SQLException
addWarning in interface EngineConnectionw - Warning to be added, will be chained to any
existing warnings.
java.sql.SQLExceptionpublic 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.Connectionjava.sql.SQLException
public final int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.ConnectiongetHoldability in interface EngineConnectionjava.sql.SQLException
final int statementHoldabilityCheck(int resultSetHoldability)
throws java.sql.SQLException
java.sql.SQLException
public void clearLOBMapping()
throws java.sql.SQLException
clearLOBMapping in interface EngineConnectionjava.sql.SQLException
public java.lang.Object getLOBMapping(int key)
throws java.sql.SQLException
getLOBMapping in interface EngineConnectionkey - the integer that represents the LOB locator value.
java.sql.SQLException
public java.lang.String getCurrentSchemaName()
throws java.sql.SQLException
getCurrentSchemaName in interface EngineConnectionjava.sql.SQLException
public void resetFromPool()
throws java.sql.SQLException
EngineConnectionNote 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 EngineConnectionjava.sql.SQLExceptionEngineConnectionpublic final ExceptionFactory getExceptionFactory()
getExceptionFactory in interface EngineConnection
public java.lang.String getSchema()
throws java.sql.SQLException
getSchema in interface EngineConnectionjava.sql.SQLException
public void setSchema(java.lang.String schemaName)
throws java.sql.SQLException
setSchema in interface EngineConnectionjava.sql.SQLException
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||