public class JDBCDataSource<T extends JDBCConnectionSettings> extends Object implements DataSource
| Constructor and Description |
|---|
JDBCDataSource(JDBCServer inServer,
String inDatabaseName) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String inUsername,
String inPassword) |
protected LoginCredentials |
getCredentials() |
String |
getDatabaseName() |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
JDBCServer |
getServer() |
T |
getSettings() |
protected T |
initSettings() |
boolean |
isWrapperFor(Class<?> inInterface) |
String |
name() |
JDBCDataSource |
setCredentials(LoginCredentials inValue) |
void |
setLoginTimeout(int inValueInSeconds) |
void |
setLogWriter(PrintWriter inValue) |
JDBCDataSource |
setName(String inValue) |
JDBCDataSource |
setParentLogger(Logger inValue) |
JDBCDataSource |
setSettings(T inValue) |
<T> T |
unwrap(Class<T> inInterface) |
public JDBCDataSource(JDBCServer inServer, String inDatabaseName)
public JDBCDataSource setName(String inValue)
public JDBCDataSource setSettings(T inValue)
public T getSettings()
public JDBCServer getServer()
public String getDatabaseName()
public JDBCDataSource setCredentials(LoginCredentials inValue)
protected LoginCredentials getCredentials()
public JDBCDataSource setParentLogger(Logger inValue)
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String inUsername, String inPassword) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter inValue) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int inValueInSeconds) throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout() throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic <T> T unwrap(Class<T> inInterface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> inInterface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionprotected T initSettings()
jataylor@hairyfatguy.com