package org.theonefx.wcframework.jdbc.datasource; import java.sql.Connection; /** * Subinterface of {@link java.sql.Connection} to be implemented by * Connection proxies. Allows access to the underlying target Connection. * * <p>This interface can be checked when there is a need to cast to a * native JDBC Connection such as Oracle's OracleConnection. Spring's * {@link org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter} * automatically detects such proxies before delegating to the actual * unwrapping for a specific connection pool. */ public interface ConnectionProxy extends Connection { /** * Return the target Connection of this proxy. * <p>This will typically be the native driver Connection * or a wrapper from a connection pool. * @return the underlying Connection (never <code>null</code>) */ Connection getTargetConnection(); }