org.apache.openjpa.jdbc.schema
Class DataSourceFactory.DefaultsDataSource
java.lang.Object
org.apache.openjpa.lib.jdbc.DelegatingDataSource
org.apache.openjpa.jdbc.schema.DataSourceFactory.DefaultsDataSource
- All Implemented Interfaces:
- Wrapper, CommonDataSource, DataSource, Closeable
- Enclosing class:
- DataSourceFactory
protected abstract static class DataSourceFactory.DefaultsDataSource
- extends DelegatingDataSource
A data source with pre-configured default user name and password.
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingDataSource |
appendInfo, close, enforceAbstract, equals, getDelegate, getInnermostDelegate, getLoginTimeout, getLogWriter, hashCode, isWrapperFor, newInstance, setLoginTimeout, setLogWriter, toString, unwrap |
DataSourceFactory.DefaultsDataSource
public DataSourceFactory.DefaultsDataSource(DataSource ds,
String user,
String pass)
newInstance
public static DataSourceFactory.DefaultsDataSource newInstance(DataSource ds,
String user,
String pass)
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Overrides:
getConnection
in class DelegatingDataSource
- Throws:
SQLException
getConnection
public Connection getConnection(String user,
String pass)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Overrides:
getConnection
in class DelegatingDataSource
- Throws:
SQLException
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.