|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.util.db.DataSourceWrapper
public class DataSourceWrapper
This class delegates all calls to the corresponding method on the wrapped DataSource
except for the getConnection()
method,
which delegates to DataSource#getConnection(String, String)
with the username and password
which are given on construction.
Constructor Summary | |
---|---|
DataSourceWrapper(DataSource dataSource,
String username,
String password)
|
Method Summary | ||
---|---|---|
Connection |
getConnection()
|
|
Connection |
getConnection(String username,
String password)
|
|
int |
getLoginTimeout()
|
|
PrintWriter |
getLogWriter()
|
|
boolean |
isWrapperFor(Class<?> arg0)
Java 6 method. |
|
void |
setLoginTimeout(int seconds)
|
|
void |
setLogWriter(PrintWriter out)
|
|
|
unwrap(Class<T> arg0)
Java 6 method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataSourceWrapper(DataSource dataSource, String username, String password)
dataSource
- the DataSource
to wrapusername
- the username to usepassword
- the password to useMethod Detail |
---|
public boolean isWrapperFor(Class<?> arg0) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public <T> T unwrap(Class<T> arg0) throws SQLException
unwrap
in interface Wrapper
SQLException
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface DataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |