Package com.appslandia.common.jdbc
Class DataSourceWrapper
- java.lang.Object
-
- com.appslandia.common.jdbc.DataSourceWrapper
-
- All Implemented Interfaces:
java.sql.Wrapper,javax.sql.CommonDataSource,javax.sql.DataSource
public class DataSourceWrapper extends java.lang.Object implements javax.sql.DataSource- Author:
- Loc Ha
-
-
Constructor Summary
Constructors Constructor Description DataSourceWrapper()DataSourceWrapper(javax.sql.DataSource ds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.ConnectiongetConnection()java.sql.ConnectiongetConnection(java.lang.String arg0, java.lang.String arg1)protected javax.sql.DataSourcegetDs()intgetLoginTimeout()java.io.PrintWritergetLogWriter()java.util.logging.LoggergetParentLogger()java.sql.ConnectiongetTxConnection()booleanisWrapperFor(java.lang.Class<?> arg0)voidsetLoginTimeout(int arg0)voidsetLogWriter(java.io.PrintWriter arg0)<T> Tunwrap(java.lang.Class<T> arg0)
-
-
-
Method Detail
-
getDs
protected javax.sql.DataSource getDs()
-
getTxConnection
public java.sql.Connection getTxConnection() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection(java.lang.String arg0, java.lang.String arg1) throws java.sql.SQLException- Specified by:
getConnectionin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLogWriter
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException- Specified by:
getLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
getLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getLoginTimeout
public int getLoginTimeout() throws java.sql.SQLException- Specified by:
getLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
getLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
getParentLogger
public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException- Specified by:
getParentLoggerin interfacejavax.sql.CommonDataSource- Throws:
java.sql.SQLFeatureNotSupportedException
-
setLogWriter
public void setLogWriter(java.io.PrintWriter arg0) throws java.sql.SQLException- Specified by:
setLogWriterin interfacejavax.sql.CommonDataSource- Specified by:
setLogWriterin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
setLoginTimeout
public void setLoginTimeout(int arg0) throws java.sql.SQLException- Specified by:
setLoginTimeoutin interfacejavax.sql.CommonDataSource- Specified by:
setLoginTimeoutin interfacejavax.sql.DataSource- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> arg0) throws java.sql.SQLException- Specified by:
isWrapperForin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> arg0) throws java.sql.SQLException- Specified by:
unwrapin interfacejava.sql.Wrapper- Throws:
java.sql.SQLException
-
-