- java.lang.Object
-
- com.appslandia.common.jdbc.DataSourceWrapper
-
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
public class DataSourceWrapper extends Object implements DataSource
- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description DataSourceWrapper()DataSourceWrapper(DataSource ds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()ConnectiongetConnection(String arg0, String arg1)protected DataSourcegetDs()intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()ConnectiongetTxConnection()booleanisWrapperFor(Class<?> arg0)voidsetLoginTimeout(int arg0)voidsetLogWriter(PrintWriter arg0)<T> Tunwrap(Class<T> arg0)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Constructor Detail
-
DataSourceWrapper
public DataSourceWrapper()
-
DataSourceWrapper
public DataSourceWrapper(DataSource ds)
-
-
Method Detail
-
getDs
protected DataSource getDs()
-
getTxConnection
public Connection getTxConnection() throws SQLException
- Throws:
SQLException
-
getConnection
public Connection getConnection() throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
public Connection getConnection(String arg0, String arg1) throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout() throws SQLException- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
setLogWriter
public void setLogWriter(PrintWriter arg0) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int arg0) throws SQLException- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> arg0) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
public <T> T unwrap(Class<T> arg0) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
-