|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.lib.jdbc.DelegatingConnection
public class DelegatingConnection
Wrapper around an existing connection. Subclasses can override the
methods whose behavior they mean to change. The equals
and
hashCode
methods pass through to the base underlying data
store connection.
Field Summary |
---|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
DelegatingConnection(java.sql.Connection conn)
|
Method Summary | |
---|---|
protected void |
appendInfo(java.lang.StringBuffer buf)
|
void |
clearWarnings()
|
void |
close()
|
void |
commit()
|
java.sql.Statement |
createStatement()
|
protected java.sql.Statement |
createStatement(boolean wrap)
Create a statement, with the option of not wrapping it in a DelegatingStatement , which is the default. |
java.sql.Statement |
createStatement(int type,
int concur)
|
protected java.sql.Statement |
createStatement(int type,
int concur,
boolean wrap)
Create a statement, with the option of not wrapping it in a DelegatingStatement , which is the default. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
protected java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
|
boolean |
equals(java.lang.Object other)
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.sql.Connection |
getDelegate()
Return the wrapped connection. |
int |
getHoldability()
|
java.sql.Connection |
getInnermostDelegate()
Return the base underlying data store connection. |
java.sql.DatabaseMetaData |
getMetaData()
|
protected java.sql.DatabaseMetaData |
getMetaData(boolean wrap)
Return the metadata, with the option of not wrapping it in a DelegatingDatabaseMetaData , which is the default. |
int |
getTransactionIsolation()
|
java.util.Map |
getTypeMap()
|
java.sql.SQLWarning |
getWarnings()
|
int |
hashCode()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String str)
|
java.sql.CallableStatement |
prepareCall(java.lang.String str)
|
protected java.sql.CallableStatement |
prepareCall(java.lang.String str,
boolean wrap)
Prepare a call, with the option of not wrapping it in a DelegatingCallableStatement , which is the default. |
java.sql.CallableStatement |
prepareCall(java.lang.String str,
int type,
int concur)
|
protected java.sql.CallableStatement |
prepareCall(java.lang.String str,
int type,
int concur,
boolean wrap)
Prepare a call, with the option of not wrapping it in a DelegatingCallableStatement , which is the default. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
protected java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String str)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String str,
boolean wrap)
Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement , which is the default. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean wrap)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean wrap)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String str,
int type,
int concur)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String str,
int type,
int concur,
boolean wrap)
Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement , which is the default. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
protected java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean wrap)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setAutoCommit(boolean bool)
|
void |
setCatalog(java.lang.String str)
|
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean bool)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String savepoint)
|
void |
setTransactionIsolation(int i)
|
void |
setTypeMap(java.util.Map map)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DelegatingConnection(java.sql.Connection conn)
Method Detail |
---|
public java.sql.Connection getDelegate()
public java.sql.Connection getInnermostDelegate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected void appendInfo(java.lang.StringBuffer buf)
public java.sql.Statement createStatement() throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.Statement createStatement(boolean wrap) throws java.sql.SQLException
DelegatingStatement
, which is the default.
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String str) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String str, boolean wrap) throws java.sql.SQLException
DelegatingPreparedStatement
, which is the default.
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String str) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.CallableStatement prepareCall(java.lang.String str, boolean wrap) throws java.sql.SQLException
DelegatingCallableStatement
, which is the default.
java.sql.SQLException
public java.lang.String nativeSQL(java.lang.String str) throws java.sql.SQLException
nativeSQL
in interface java.sql.Connection
java.sql.SQLException
public void setAutoCommit(boolean bool) throws java.sql.SQLException
setAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public boolean getAutoCommit() throws java.sql.SQLException
getAutoCommit
in interface java.sql.Connection
java.sql.SQLException
public void commit() throws java.sql.SQLException
commit
in interface java.sql.Connection
java.sql.SQLException
public void rollback() throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface java.sql.Connection
close
in interface Closeable
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Connection
java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
getMetaData
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.DatabaseMetaData getMetaData(boolean wrap) throws java.sql.SQLException
DelegatingDatabaseMetaData
, which is the default.
java.sql.SQLException
public void setReadOnly(boolean bool) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface java.sql.Connection
java.sql.SQLException
public void setCatalog(java.lang.String str) throws java.sql.SQLException
setCatalog
in interface java.sql.Connection
java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
getCatalog
in interface java.sql.Connection
java.sql.SQLException
public void setTransactionIsolation(int i) throws java.sql.SQLException
setTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
getTransactionIsolation
in interface java.sql.Connection
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Connection
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int type, int concur) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.Statement createStatement(int type, int concur, boolean wrap) throws java.sql.SQLException
DelegatingStatement
, which is the default.
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String str, int type, int concur) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String str, int type, int concur, boolean wrap) throws java.sql.SQLException
DelegatingPreparedStatement
, which is the default.
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String str, int type, int concur) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.CallableStatement prepareCall(java.lang.String str, int type, int concur, boolean wrap) throws java.sql.SQLException
DelegatingCallableStatement
, which is the default.
java.sql.SQLException
public java.util.Map getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
java.sql.SQLException
public void setTypeMap(java.util.Map map) throws java.sql.SQLException
setTypeMap
in interface java.sql.Connection
java.sql.SQLException
public void setHoldability(int holdability) throws java.sql.SQLException
setHoldability
in interface java.sql.Connection
java.sql.SQLException
public int getHoldability() throws java.sql.SQLException
getHoldability
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint() throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Savepoint setSavepoint(java.lang.String savepoint) throws java.sql.SQLException
setSavepoint
in interface java.sql.Connection
java.sql.SQLException
public void rollback(java.sql.Savepoint savepoint) throws java.sql.SQLException
rollback
in interface java.sql.Connection
java.sql.SQLException
public void releaseSavepoint(java.sql.Savepoint savepoint) throws java.sql.SQLException
releaseSavepoint
in interface java.sql.Connection
java.sql.SQLException
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
createStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
public 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
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws java.sql.SQLException
prepareCall
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
prepareStatement
in interface java.sql.Connection
java.sql.SQLException
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames, boolean wrap) throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |