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:
- java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.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 |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DataSourceFactory.DefaultsDataSource
public DataSourceFactory.DefaultsDataSource(javax.sql.DataSource ds,
java.lang.String user,
java.lang.String pass)
newInstance
public static DataSourceFactory.DefaultsDataSource newInstance(javax.sql.DataSource ds,
java.lang.String user,
java.lang.String pass)
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Overrides:
getConnection
in class DelegatingDataSource
- Throws:
java.sql.SQLException
getConnection
public java.sql.Connection getConnection(java.lang.String user,
java.lang.String pass)
throws java.sql.SQLException
- Specified by:
getConnection
in interface javax.sql.DataSource
- Overrides:
getConnection
in class DelegatingDataSource
- Throws:
java.sql.SQLException