Package org.apache.openjpa.jdbc.schema
Class SimpleDriverDataSource
java.lang.Object
org.apache.openjpa.jdbc.schema.SimpleDriverDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource,DriverDataSource
- Direct Known Subclasses:
DBCPDriverDataSource
Non-pooling driver data source.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvide any built-in decorators; may be null.Classloader for loading driver class, etc.getConnection(String username, String password) getConnection(Properties props) Driver class name.Configuration of datasource properties.protected StringConfiguration of connection.JDBC URL.JDBC user name.intprotected ConnectiongetSimpleConnection(Properties props) protected DrivervoidinitDBDictionary(DBDictionary dict) Initialize self and dictionary once available.booleanisWrapperFor(Class<?> iface) voidsetClassLoader(ClassLoader classLoader) JDBC password.voidsetConnectionDriverName(String connectionDriverName) Driver class name.voidConfiguration of datasource properties.voidsetConnectionPassword(String connectionPassword) JDBC password.voidConfiguration of connection.voidsetConnectionURL(String connectionURL) JDBC URL.voidsetConnectionUserName(String connectionUserName) JDBC user name.voidsetLoginTimeout(int seconds) voidsetLogWriter(PrintWriter out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilderMethods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
Field Details
-
_loc
-
_eloc
-
-
Constructor Details
-
SimpleDriverDataSource
public SimpleDriverDataSource()
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Throws:
SQLException
-
getSimpleConnection
- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout()- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource
-
setLoginTimeout
public void setLoginTimeout(int seconds) - Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource
-
initDBDictionary
Description copied from interface:DriverDataSourceInitialize self and dictionary once available.- Specified by:
initDBDictionaryin interfaceDriverDataSource
-
setConnectionURL
Description copied from interface:DriverDataSourceJDBC URL.- Specified by:
setConnectionURLin interfaceDriverDataSource
-
getConnectionURL
Description copied from interface:DriverDataSourceJDBC URL.- Specified by:
getConnectionURLin interfaceDriverDataSource
-
setConnectionUserName
Description copied from interface:DriverDataSourceJDBC user name.- Specified by:
setConnectionUserNamein interfaceDriverDataSource
-
getConnectionUserName
Description copied from interface:DriverDataSourceJDBC user name.- Specified by:
getConnectionUserNamein interfaceDriverDataSource
-
setConnectionPassword
Description copied from interface:DriverDataSourceJDBC password.- Specified by:
setConnectionPasswordin interfaceDriverDataSource
-
getConnectionPassword
-
setConnectionProperties
Description copied from interface:DriverDataSourceConfiguration of connection.- Specified by:
setConnectionPropertiesin interfaceDriverDataSource
-
getConnectionProperties
Description copied from interface:DriverDataSourceConfiguration of connection.- Specified by:
getConnectionPropertiesin interfaceDriverDataSource
-
setConnectionFactoryProperties
Description copied from interface:DriverDataSourceConfiguration of datasource properties.- Specified by:
setConnectionFactoryPropertiesin interfaceDriverDataSource
-
getConnectionFactoryProperties
Description copied from interface:DriverDataSourceConfiguration of datasource properties.- Specified by:
getConnectionFactoryPropertiesin interfaceDriverDataSource
-
createConnectionDecorators
Description copied from interface:DriverDataSourceProvide any built-in decorators; may be null.- Specified by:
createConnectionDecoratorsin interfaceDriverDataSource
-
setClassLoader
Description copied from interface:DriverDataSourceJDBC password.- Specified by:
setClassLoaderin interfaceDriverDataSource
-
getClassLoader
Description copied from interface:DriverDataSourceClassloader for loading driver class, etc.- Specified by:
getClassLoaderin interfaceDriverDataSource
-
setConnectionDriverName
Description copied from interface:DriverDataSourceDriver class name.- Specified by:
setConnectionDriverNamein interfaceDriverDataSource
-
getConnectionDriverName
Description copied from interface:DriverDataSourceDriver class name.- Specified by:
getConnectionDriverNamein interfaceDriverDataSource
-
getSimpleDriver
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper
-
unwrap
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-