public class DelegatingConnection extends java.lang.Object implements java.sql.Connection, Closeable
equals and
hashCode methods pass through to the base underlying data
store connection.| Constructor and Description |
|---|
DelegatingConnection(java.sql.Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(java.util.concurrent.Executor executor) |
protected void |
appendInfo(java.lang.StringBuffer buf) |
void |
clearWarnings() |
void |
close() |
void |
commit() |
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements) |
java.sql.Blob |
createBlob() |
java.sql.Clob |
createClob() |
java.sql.NClob |
createNClob() |
java.sql.SQLXML |
createSQLXML() |
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) |
java.sql.Struct |
createStruct(java.lang.String typeName,
java.lang.Object[] attributes) |
boolean |
equals(java.lang.Object other) |
boolean |
getAutoCommit() |
java.lang.String |
getCatalog() |
java.util.Properties |
getClientInfo() |
java.lang.String |
getClientInfo(java.lang.String name) |
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 |
getNetworkTimeout() |
java.lang.String |
getSchema() |
int |
getTransactionIsolation() |
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap() |
java.sql.SQLWarning |
getWarnings() |
int |
hashCode() |
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
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 |
setClientInfo(java.util.Properties properties) |
void |
setClientInfo(java.lang.String name,
java.lang.String value) |
void |
setHoldability(int holdability) |
void |
setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds) |
void |
setReadOnly(boolean bool) |
java.sql.Savepoint |
setSavepoint() |
java.sql.Savepoint |
setSavepoint(java.lang.String savepoint) |
void |
setSchema(java.lang.String schema) |
void |
setTransactionIsolation(int i) |
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> iface) |
public java.sql.Connection getDelegate()
public java.sql.Connection getInnermostDelegate()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected void appendInfo(java.lang.StringBuffer buf)
public java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(boolean wrap)
throws java.sql.SQLException
DelegatingStatement, which is the default.java.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String str)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String str,
boolean wrap)
throws java.sql.SQLException
DelegatingPreparedStatement, which is the default.java.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String str)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.CallableStatement prepareCall(java.lang.String str,
boolean wrap)
throws java.sql.SQLException
DelegatingCallableStatement, which is the default.java.sql.SQLExceptionpublic java.lang.String nativeSQL(java.lang.String str)
throws java.sql.SQLException
nativeSQL in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setAutoCommit(boolean bool)
throws java.sql.SQLException
setAutoCommit in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface java.sql.Connectionjava.sql.SQLExceptionpublic void commit()
throws java.sql.SQLException
commit in interface java.sql.Connectionjava.sql.SQLExceptionpublic void rollback()
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLExceptionpublic void close()
throws java.sql.SQLException
public boolean isClosed()
throws java.sql.SQLException
isClosed in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.DatabaseMetaData getMetaData(boolean wrap)
throws java.sql.SQLException
DelegatingDatabaseMetaData, which is the default.java.sql.SQLExceptionpublic void setReadOnly(boolean bool)
throws java.sql.SQLException
setReadOnly in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isReadOnly()
throws java.sql.SQLException
isReadOnly in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setCatalog(java.lang.String str)
throws java.sql.SQLException
setCatalog in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getCatalog()
throws java.sql.SQLException
getCatalog in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setTransactionIsolation(int i)
throws java.sql.SQLException
setTransactionIsolation in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.SQLWarning getWarnings()
throws java.sql.SQLException
getWarnings in interface java.sql.Connectionjava.sql.SQLExceptionpublic void clearWarnings()
throws java.sql.SQLException
clearWarnings in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int type,
int concur)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(int type,
int concur,
boolean wrap)
throws java.sql.SQLException
DelegatingStatement, which is the default.java.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String str,
int type,
int concur)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected 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.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String str,
int type,
int concur)
throws java.sql.SQLException
prepareCall in interface java.sql.Connectionjava.sql.SQLExceptionprotected 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.SQLExceptionpublic java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getHoldability()
throws java.sql.SQLException
getHoldability in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Savepoint setSavepoint(java.lang.String savepoint)
throws java.sql.SQLException
setSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
rollback in interface java.sql.Connectionjava.sql.SQLExceptionpublic void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
releaseSavepoint in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
createStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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.SQLExceptionprotected java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
prepareStatement in interface java.sql.Connectionjava.sql.SQLExceptionprotected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean wrap)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic java.sql.Array createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
throws java.sql.SQLException
createArrayOf in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Blob createBlob()
throws java.sql.SQLException
createBlob in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Clob createClob()
throws java.sql.SQLException
createClob in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.NClob createNClob()
throws java.sql.SQLException
createNClob in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
createSQLXML in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
createStruct in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.util.Properties getClientInfo()
throws java.sql.SQLException
getClientInfo in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
getClientInfo in interface java.sql.Connectionjava.sql.SQLExceptionpublic boolean isValid(int timeout)
throws java.sql.SQLException
isValid in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoExceptionpublic void setClientInfo(java.lang.String name,
java.lang.String value)
throws java.sql.SQLClientInfoException
setClientInfo in interface java.sql.Connectionjava.sql.SQLClientInfoExceptionpublic void abort(java.util.concurrent.Executor executor)
throws java.sql.SQLException
abort in interface java.sql.Connectionjava.sql.SQLExceptionpublic int getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
setNetworkTimeout in interface java.sql.Connectionjava.sql.SQLExceptionpublic java.lang.String getSchema()
throws java.sql.SQLException
getSchema in interface java.sql.Connectionjava.sql.SQLExceptionpublic void setSchema(java.lang.String schema)
throws java.sql.SQLException
setSchema in interface java.sql.Connectionjava.sql.SQLExceptionCopyright © 2006-2013 Apache Software Foundation. All Rights Reserved.