public class GenericDatasource extends Object implements DataSource
Sql2o.Sql2o(String, String, String)
constructor overload.Constructor and Description |
---|
GenericDatasource(String url,
Properties properties) |
GenericDatasource(String url,
String user,
String password) |
Modifier and Type | Method and Description |
---|---|
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
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 void setLogWriter(PrintWriter printWriter) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public void setLoginTimeout(int i) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
public <T> T unwrap(Class<T> tClass) throws SQLException
unwrap
in interface Wrapper
SQLException
public boolean isWrapperFor(Class<?> aClass) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
Copyright © 2015. All rights reserved.