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 DataSource
SQLException
public Connection getConnection(String inUsername, String inPassword) throws SQLException
getConnection
in interface DataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter inValue) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public void setLoginTimeout(int inValueInSeconds) 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> inInterface) throws SQLException
unwrap
in interface Wrapper
SQLException
public boolean isWrapperFor(Class<?> inInterface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
protected T initSettings()