public class DelegatingNamedDataSource extends Object implements NamedDataSource, com.jn.langx.Delegatable<DataSource>, com.jn.langx.lifecycle.Initializable
| 构造器和说明 |
|---|
DelegatingNamedDataSource()
Create a new DelegatingDataSource.
|
DelegatingNamedDataSource(DataSource targetDataSource)
Create a new DelegatingDataSource.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
DataSourceKey |
getDataSourceKey() |
DataSourceProperties |
getDataSourceProperties() |
DataSource |
getDelegate() |
String |
getGroup() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
String |
getName() |
Logger |
getParentLogger() |
void |
init() |
boolean |
isSlave() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setDataSourceProperties(DataSourceProperties properties) |
void |
setDelegate(DataSource delegate) |
void |
setGroup(String group) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setName(String name) |
String |
toString() |
<T> T |
unwrap(Class<T> iface) |
public DelegatingNamedDataSource()
public DelegatingNamedDataSource(DataSource targetDataSource)
targetDataSource - the target DataSourcepublic DataSource getDelegate()
getDelegate 在接口中 com.jn.langx.Delegatable<DataSource>public void setDelegate(DataSource delegate)
setDelegate 在接口中 com.jn.langx.Delegatable<DataSource>public boolean isSlave()
isSlave 在接口中 NamedDataSourcepublic void init()
throws com.jn.langx.lifecycle.InitializationException
init 在接口中 com.jn.langx.lifecycle.Initializablecom.jn.langx.lifecycle.InitializationExceptionpublic DataSourceProperties getDataSourceProperties()
getDataSourceProperties 在接口中 NamedDataSourcepublic void setDataSourceProperties(DataSourceProperties properties)
setDataSourceProperties 在接口中 NamedDataSourcepublic Connection getConnection() throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter 在接口中 CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter 在接口中 CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap 在接口中 WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor 在接口中 WrapperSQLExceptionpublic Logger getParentLogger()
getParentLogger 在接口中 CommonDataSourcepublic String getGroup()
getGroup 在接口中 NamedDataSourcepublic void setGroup(String group)
setGroup 在接口中 NamedDataSourcepublic void setName(String name)
setName 在接口中 com.jn.langx.Namedpublic String getName()
getName 在接口中 com.jn.langx.Namedpublic DataSourceKey getDataSourceKey()
getDataSourceKey 在接口中 NamedDataSourceCopyright © 2021. All rights reserved.