public class DataSourceImpl extends InitializeObject implements DataSource
mutex| Constructor and Description |
|---|
DataSourceImpl() |
| 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 |
getUserName() |
protected void |
init() |
protected void |
initProperties(Properties props) |
boolean |
isWrapperFor(Class<?> iface) |
DataSourceImpl |
load(File file) |
DataSourceImpl |
load(InputStream is) |
DataSourceImpl |
load(Reader r) |
DataSourceImpl |
load(String file) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
DataSourceImpl |
setPassword(String password) |
DataSourceImpl |
setUrl(String url) |
DataSourceImpl |
setUserName(String userName) |
<T> T |
unwrap(Class<T> iface) |
assertNotInitialized, destroy, initializeprotected void init()
throws Exception
init in class InitializeObjectExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic DataSourceImpl load(String file)
public DataSourceImpl load(File file)
public DataSourceImpl load(InputStream is)
public DataSourceImpl load(Reader r)
protected void initProperties(Properties props)
public String getUrl()
public DataSourceImpl setUrl(String url)
public String getUserName()
public DataSourceImpl setUserName(String userName)
public String getPassword()
public DataSourceImpl setPassword(String password)
Copyright © 2017. All rights reserved.