org.apache.openjpa.jdbc.schema
public abstract class SimpleDriverDataSource extends java.lang.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 |
|---|---|
java.util.List |
createConnectionDecorators()
Provide any built-in decorators; may be null.
|
java.lang.ClassLoader |
getClassLoader()
Classloader for loading driver class, etc.
|
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.util.Properties props) |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password) |
java.lang.String |
getConnectionDriverName()
Driver class name.
|
java.util.Properties |
getConnectionFactoryProperties()
Configuration of datasource properties.
|
java.util.Properties |
getConnectionProperties()
Configuration of connection.
|
java.lang.String |
getConnectionURL()
JDBC URL.
|
java.lang.String |
getConnectionUserName()
JDBC user name.
|
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
void |
initDBDictionary(DBDictionary dict)
Initialize self and dictionary once available.
|
boolean |
isWrapperFor(java.lang.Class iface) |
static SimpleDriverDataSource |
newInstance() |
void |
setClassLoader(java.lang.ClassLoader classLoader)
JDBC password.
|
void |
setConnectionDriverName(java.lang.String connectionDriverName)
Driver class name.
|
void |
setConnectionFactoryProperties(java.util.Properties props)
Configuration of datasource properties.
|
void |
setConnectionPassword(java.lang.String connectionPassword)
JDBC password.
|
void |
setConnectionProperties(java.util.Properties props)
Configuration of connection.
|
void |
setConnectionURL(java.lang.String connectionURL)
JDBC URL.
|
void |
setConnectionUserName(java.lang.String connectionUserName)
JDBC user name.
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(java.io.PrintWriter out) |
java.lang.Object |
unwrap(java.lang.Class iface) |
public static SimpleDriverDataSource newInstance()
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection(java.util.Properties props)
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getLoginTimeout()
getLoginTimeout in interface javax.sql.CommonDataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface javax.sql.CommonDataSourcepublic java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.CommonDataSourcepublic void setLogWriter(java.io.PrintWriter out)
setLogWriter in interface javax.sql.CommonDataSourcepublic void initDBDictionary(DBDictionary dict)
DriverDataSourceinitDBDictionary in interface DriverDataSourcepublic void setConnectionURL(java.lang.String connectionURL)
DriverDataSourcesetConnectionURL in interface DriverDataSourcepublic java.lang.String getConnectionURL()
DriverDataSourcegetConnectionURL in interface DriverDataSourcepublic void setConnectionUserName(java.lang.String connectionUserName)
DriverDataSourcesetConnectionUserName in interface DriverDataSourcepublic java.lang.String getConnectionUserName()
DriverDataSourcegetConnectionUserName in interface DriverDataSourcepublic void setConnectionPassword(java.lang.String connectionPassword)
DriverDataSourcesetConnectionPassword in interface DriverDataSourcepublic void setConnectionProperties(java.util.Properties props)
DriverDataSourcesetConnectionProperties in interface DriverDataSourcepublic java.util.Properties getConnectionProperties()
DriverDataSourcegetConnectionProperties in interface DriverDataSourcepublic void setConnectionFactoryProperties(java.util.Properties props)
DriverDataSourcesetConnectionFactoryProperties in interface DriverDataSourcepublic java.util.Properties getConnectionFactoryProperties()
DriverDataSourcegetConnectionFactoryProperties in interface DriverDataSourcepublic java.util.List createConnectionDecorators()
DriverDataSourcecreateConnectionDecorators in interface DriverDataSourcepublic void setClassLoader(java.lang.ClassLoader classLoader)
DriverDataSourcesetClassLoader in interface DriverDataSourcepublic java.lang.ClassLoader getClassLoader()
DriverDataSourcegetClassLoader in interface DriverDataSourcepublic void setConnectionDriverName(java.lang.String connectionDriverName)
DriverDataSourcesetConnectionDriverName in interface DriverDataSourcepublic java.lang.String getConnectionDriverName()
DriverDataSourcegetConnectionDriverName in interface DriverDataSourcepublic boolean isWrapperFor(java.lang.Class iface)
isWrapperFor in interface java.sql.Wrapperpublic java.lang.Object unwrap(java.lang.Class iface)
unwrap in interface java.sql.Wrapper