|
||||||||||
| 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()
|
|
Logger |
getParentLogger()
Unsupported Java 7 method. |
|
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 use| Method Detail |
|---|
public boolean isWrapperFor(Class<?> arg0)
throws SQLException
isWrapperFor in interface WrapperSQLException
public <T> T unwrap(Class<T> arg0)
throws SQLException
unwrap in interface WrapperSQLExceptionpublic Logger getParentLogger()
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLException
public Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface DataSourceSQLException
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||