public class BaseDataSource extends Object implements DataSource
| 构造器和说明 |
|---|
BaseDataSource(String driverName,
String url,
String user,
String password) |
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String user,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int loginTimeout) |
void |
setLogWriter(PrintWriter logWriter) |
<T> T |
unwrap(Class<T> iface) |
public Connection getConnection() throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic Connection getConnection(String user, String password) throws SQLException
getConnection 在接口中 DataSourceSQLExceptionpublic void setLoginTimeout(int loginTimeout)
throws SQLException
setLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter logWriter) throws SQLException
setLogWriter 在接口中 CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter 在接口中 CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap 在接口中 WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor 在接口中 WrapperSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger 在接口中 CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2024. All rights reserved.