org.apache.derby.iapi.jdbc
Class BrokeredConnection
java.lang.Object
org.apache.derby.iapi.jdbc.BrokeredConnection
- All Implemented Interfaces:
- java.sql.Connection
- Direct Known Subclasses:
- BrokeredConnection30
- public class BrokeredConnection
- extends java.lang.Object
- implements java.sql.Connection
This is a rudimentary connection that delegates
EVERYTHING to Connection.
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary |
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()
|
int |
getHoldability()
|
protected int |
getJDBCLevel()
|
java.sql.DatabaseMetaData |
getMetaData()
|
protected java.sql.Connection |
getRealConnection()
A little indirection for getting the real connection. |
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
|
java.sql.SQLWarning |
getWarnings()
|
boolean |
isClosed()
|
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)
|
protected 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)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean readOnly)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
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)
|
void |
syncState()
Sync up the state of the underlying connection
with the state of this new handle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
control
protected final BrokeredConnectionControl control
isClosed
private boolean isClosed
stateHoldability
private int stateHoldability
stateIsolationLevel
private int stateIsolationLevel
- Maintain state as seen by this Connection handle, not the state
of the underlying Connection it is attached to.
stateReadOnly
private boolean stateReadOnly
stateAutoCommit
private boolean stateAutoCommit
BrokeredConnection
public BrokeredConnection(BrokeredConnectionControl control)
setAutoCommit
public final void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
- Specified by:
setAutoCommit
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getAutoCommit
public final boolean getAutoCommit()
throws java.sql.SQLException
- Specified by:
getAutoCommit
in interface java.sql.Connection
- Throws:
java.sql.SQLException
createStatement
public final java.sql.Statement createStatement()
throws java.sql.SQLException
- Specified by:
createStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareCall
public final java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
- Specified by:
prepareCall
in interface java.sql.Connection
- Throws:
java.sql.SQLException
nativeSQL
public final java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
- Specified by:
nativeSQL
in interface java.sql.Connection
- Throws:
java.sql.SQLException
commit
public final void commit()
throws java.sql.SQLException
- Specified by:
commit
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setSavepoint
public final java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
- Specified by:
setSavepoint
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setSavepoint
public final java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
- Specified by:
setSavepoint
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setHoldability
public final void setHoldability(int holdability)
throws java.sql.SQLException
- Specified by:
setHoldability
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getHoldability
public final int getHoldability()
throws java.sql.SQLException
- Specified by:
getHoldability
in interface java.sql.Connection
- Throws:
java.sql.SQLException
releaseSavepoint
public final void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Specified by:
releaseSavepoint
in interface java.sql.Connection
- Throws:
java.sql.SQLException
rollback
public final void rollback()
throws java.sql.SQLException
- Specified by:
rollback
in interface java.sql.Connection
- Throws:
java.sql.SQLException
rollback
public final void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Specified by:
rollback
in interface java.sql.Connection
- Throws:
java.sql.SQLException
close
public final void close()
throws java.sql.SQLException
- Specified by:
close
in interface java.sql.Connection
- Throws:
java.sql.SQLException
isClosed
public final boolean isClosed()
throws java.sql.SQLException
- Specified by:
isClosed
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getWarnings
public final java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
- Specified by:
getWarnings
in interface java.sql.Connection
- Throws:
java.sql.SQLException
clearWarnings
public final void clearWarnings()
throws java.sql.SQLException
- Specified by:
clearWarnings
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getMetaData
public final java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
- Specified by:
getMetaData
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setReadOnly
public final void setReadOnly(boolean readOnly)
throws java.sql.SQLException
- Specified by:
setReadOnly
in interface java.sql.Connection
- Throws:
java.sql.SQLException
isReadOnly
public final boolean isReadOnly()
throws java.sql.SQLException
- Specified by:
isReadOnly
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setCatalog
public final void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
- Specified by:
setCatalog
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getCatalog
public final java.lang.String getCatalog()
throws java.sql.SQLException
- Specified by:
getCatalog
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setTransactionIsolation
public final void setTransactionIsolation(int level)
throws java.sql.SQLException
- Specified by:
setTransactionIsolation
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getTransactionIsolation
public final int getTransactionIsolation()
throws java.sql.SQLException
- Specified by:
getTransactionIsolation
in interface java.sql.Connection
- Throws:
java.sql.SQLException
createStatement
public final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
- Specified by:
createStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
createStatement
public final java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
- Specified by:
createStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareStatement
public final java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
- Specified by:
prepareStatement
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareCall
public final java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
- Specified by:
prepareCall
in interface java.sql.Connection
- Throws:
java.sql.SQLException
prepareCall
public final java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
- Specified by:
prepareCall
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getTypeMap
public final java.util.Map getTypeMap()
throws java.sql.SQLException
- Specified by:
getTypeMap
in interface java.sql.Connection
- Throws:
java.sql.SQLException
setTypeMap
public final void setTypeMap(java.util.Map map)
throws java.sql.SQLException
- Specified by:
setTypeMap
in interface java.sql.Connection
- Throws:
java.sql.SQLException
getRealConnection
protected final java.sql.Connection getRealConnection()
throws java.sql.SQLException
- A little indirection for getting the real connection.
- Returns:
- the current connection
- Throws:
java.sql.SQLException
notifyException
protected final void notifyException(java.sql.SQLException sqle)
syncState
public void syncState()
throws java.sql.SQLException
- Sync up the state of the underlying connection
with the state of this new handle.
- Throws:
java.sql.SQLException
setState
public void setState(boolean complete)
throws java.sql.SQLException
- Set the state of the underlying connection according to the
state of this connection's view of state.
- Parameters:
complete
- If true set the complete state of the underlying
Connection, otherwise set only the Connection related state (ie.
the non-transaction specific state).
- Throws:
java.sql.SQLException
newBrokeredStatement
public BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
newBrokeredStatement
public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql,
java.lang.Object generatedKeys)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
newBrokeredStatement
public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl,
java.lang.String sql)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getJDBCLevel
protected int getJDBCLevel()
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.