接口 ConnectionProxy
- 所有超级接口:
AutoCloseable
,Connection
,Wrapper
public interface ConnectionProxy extends Connection
Subinterface ofConnection
to be implemented by Connection proxies. Allows access to the underlying target Connection.This interface can be checked when there is a need to cast to a native JDBC Connection such as Oracle's OracleConnection. Spring's
NativeJdbcExtractorAdapter
automatically detects such proxies before delegating to the actual unwrapping for a specific connection pool. Alternatively, all such connections also support JDBC 4.0'sWrapper.unwrap(java.lang.Class<T>)
.- 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
TransactionAwareDataSourceProxy
,LazyConnectionDataSourceProxy
,DataSourceUtils.getTargetConnection(java.sql.Connection)
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 Connection
getTargetConnection()
Return the target Connection of this proxy.从接口继承的方法 java.sql.Connection
abort, beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMap
从接口继承的方法 java.sql.Wrapper
isWrapperFor, unwrap
方法详细资料
getTargetConnection
Connection getTargetConnection()
Return the target Connection of this proxy.This will typically be the native driver Connection or a wrapper from a connection pool.
- 返回:
- the underlying Connection (never
null
)