public class GenericDatasource extends Object implements DataSource
Sql2o.Sql2o(String, String, String) constructor overload.| 构造器和说明 |
|---|
GenericDatasource(String url,
Properties properties) |
GenericDatasource(String url,
String user,
String password) |
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
String |
getPassword() |
String |
getUrl() |
String |
getUser() |
boolean |
isWrapperFor(Class<?> aClass) |
void |
setLoginTimeout(int i) |
void |
setLogWriter(PrintWriter printWriter) |
<T> T |
unwrap(Class<T> tClass) |
public GenericDatasource(String url, Properties properties)
public String getUrl()
public String getUser()
public String getPassword()
public 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 printWriter) throws SQLException
setLogWriter 在接口中 CommonDataSourceSQLExceptionpublic void setLoginTimeout(int i)
throws SQLException
setLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout 在接口中 CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger 在接口中 CommonDataSourceSQLFeatureNotSupportedExceptionpublic <T> T unwrap(Class<T> tClass) throws SQLException
unwrap 在接口中 WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> aClass) throws SQLException
isWrapperFor 在接口中 WrapperSQLExceptionCopyright © 2021. All rights reserved.