public class SimpleDriverDataSource extends Object implements DriverDataSource
| Modifier and Type | Field and Description |
|---|---|
protected static Localizer |
_eloc |
protected static Localizer |
_loc |
| Constructor and Description |
|---|
SimpleDriverDataSource() |
| Modifier and Type | Method and Description |
|---|---|
List<ConnectionDecorator> |
createConnectionDecorators()
Provide any built-in decorators; may be null.
|
ClassLoader |
getClassLoader()
Classloader for loading driver class, etc.
|
Connection |
getConnection() |
Connection |
getConnection(Properties props) |
Connection |
getConnection(String username,
String password) |
String |
getConnectionDriverName()
Driver class name.
|
Properties |
getConnectionFactoryProperties()
Configuration of datasource properties.
|
protected String |
getConnectionPassword() |
Properties |
getConnectionProperties()
Configuration of connection.
|
String |
getConnectionURL()
JDBC URL.
|
String |
getConnectionUserName()
JDBC user name.
|
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
protected Connection |
getSimpleConnection(Properties props) |
protected Driver |
getSimpleDriver() |
void |
initDBDictionary(DBDictionary dict)
Initialize self and dictionary once available.
|
boolean |
isWrapperFor(Class<?> iface) |
void |
setClassLoader(ClassLoader classLoader)
JDBC password.
|
void |
setConnectionDriverName(String connectionDriverName)
Driver class name.
|
void |
setConnectionFactoryProperties(Properties props)
Configuration of datasource properties.
|
void |
setConnectionPassword(String connectionPassword)
JDBC password.
|
void |
setConnectionProperties(Properties props)
Configuration of connection.
|
void |
setConnectionURL(String connectionURL)
JDBC URL.
|
void |
setConnectionUserName(String connectionUserName)
JDBC user name.
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
Object |
unwrap(Class iface) |
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(Properties props) throws SQLException
SQLExceptionprotected Connection getSimpleConnection(Properties props) throws SQLException
SQLExceptionpublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface CommonDataSourcepublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter out)
setLogWriter in interface CommonDataSourcepublic void initDBDictionary(DBDictionary dict)
DriverDataSourceinitDBDictionary in interface DriverDataSourcepublic void setConnectionURL(String connectionURL)
DriverDataSourcesetConnectionURL in interface DriverDataSourcepublic String getConnectionURL()
DriverDataSourcegetConnectionURL in interface DriverDataSourcepublic void setConnectionUserName(String connectionUserName)
DriverDataSourcesetConnectionUserName in interface DriverDataSourcepublic String getConnectionUserName()
DriverDataSourcegetConnectionUserName in interface DriverDataSourcepublic void setConnectionPassword(String connectionPassword)
DriverDataSourcesetConnectionPassword in interface DriverDataSourceprotected String getConnectionPassword()
public void setConnectionProperties(Properties props)
DriverDataSourcesetConnectionProperties in interface DriverDataSourcepublic Properties getConnectionProperties()
DriverDataSourcegetConnectionProperties in interface DriverDataSourcepublic void setConnectionFactoryProperties(Properties props)
DriverDataSourcesetConnectionFactoryProperties in interface DriverDataSourcepublic Properties getConnectionFactoryProperties()
DriverDataSourcegetConnectionFactoryProperties in interface DriverDataSourcepublic List<ConnectionDecorator> createConnectionDecorators()
DriverDataSourcecreateConnectionDecorators in interface DriverDataSourcepublic void setClassLoader(ClassLoader classLoader)
DriverDataSourcesetClassLoader in interface DriverDataSourcepublic ClassLoader getClassLoader()
DriverDataSourcegetClassLoader in interface DriverDataSourcepublic void setConnectionDriverName(String connectionDriverName)
DriverDataSourcesetConnectionDriverName in interface DriverDataSourcepublic String getConnectionDriverName()
DriverDataSourcegetConnectionDriverName in interface DriverDataSourceprotected Driver getSimpleDriver()
public boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface Wrapperpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.