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.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.util.Properties props) throws java.sql.SQLException
java.sql.SQLException
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.CommonDataSource
public void initDBDictionary(DBDictionary dict)
DriverDataSource
initDBDictionary
in interface DriverDataSource
public void setConnectionURL(java.lang.String connectionURL)
DriverDataSource
setConnectionURL
in interface DriverDataSource
public java.lang.String getConnectionURL()
DriverDataSource
getConnectionURL
in interface DriverDataSource
public void setConnectionUserName(java.lang.String connectionUserName)
DriverDataSource
setConnectionUserName
in interface DriverDataSource
public java.lang.String getConnectionUserName()
DriverDataSource
getConnectionUserName
in interface DriverDataSource
public void setConnectionPassword(java.lang.String connectionPassword)
DriverDataSource
setConnectionPassword
in interface DriverDataSource
public void setConnectionProperties(java.util.Properties props)
DriverDataSource
setConnectionProperties
in interface DriverDataSource
public java.util.Properties getConnectionProperties()
DriverDataSource
getConnectionProperties
in interface DriverDataSource
public void setConnectionFactoryProperties(java.util.Properties props)
DriverDataSource
setConnectionFactoryProperties
in interface DriverDataSource
public java.util.Properties getConnectionFactoryProperties()
DriverDataSource
getConnectionFactoryProperties
in interface DriverDataSource
public java.util.List createConnectionDecorators()
DriverDataSource
createConnectionDecorators
in interface DriverDataSource
public void setClassLoader(java.lang.ClassLoader classLoader)
DriverDataSource
setClassLoader
in interface DriverDataSource
public java.lang.ClassLoader getClassLoader()
DriverDataSource
getClassLoader
in interface DriverDataSource
public void setConnectionDriverName(java.lang.String connectionDriverName)
DriverDataSource
setConnectionDriverName
in interface DriverDataSource
public java.lang.String getConnectionDriverName()
DriverDataSource
getConnectionDriverName
in interface DriverDataSource
public boolean isWrapperFor(java.lang.Class iface)
isWrapperFor
in interface java.sql.Wrapper
public java.lang.Object unwrap(java.lang.Class iface)
unwrap
in interface java.sql.Wrapper