|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.jdbc.DelegatingDataSource org.apache.openjpa.lib.jdbc.DecoratingDataSource
public abstract class DecoratingDataSource
Delegating data source that maintains a list of ConnectionDecorator
s.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.lib.jdbc.DelegatingDataSource |
---|
concreteImpl |
Constructor Summary | |
---|---|
DecoratingDataSource(DataSource ds)
Constructor. |
Method Summary | |
---|---|
void |
addDecorator(ConnectionDecorator decorator)
Add a connection decorator. |
void |
addDecorators(Collection<ConnectionDecorator> decorators)
Add multiple connection decorators efficiently. |
void |
clearDecorators()
Clear all decorators. |
Connection |
getConnection()
|
Connection |
getConnection(String user,
String pass)
|
Collection<ConnectionDecorator> |
getDecorators()
Return a read-only list of connection decorators in the order they were added. |
static DecoratingDataSource |
newDecoratingDataSource(DataSource ds)
|
boolean |
removeDecorator(ConnectionDecorator decorator)
Remove a connection decorator. |
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 |
Constructor Detail |
---|
public DecoratingDataSource(DataSource ds)
Method Detail |
---|
public static DecoratingDataSource newDecoratingDataSource(DataSource ds)
public Collection<ConnectionDecorator> getDecorators()
public void addDecorator(ConnectionDecorator decorator)
public void addDecorators(Collection<ConnectionDecorator> decorators)
public boolean removeDecorator(ConnectionDecorator decorator)
public void clearDecorators()
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
getConnection
in class DelegatingDataSource
SQLException
public Connection getConnection(String user, String pass) throws SQLException
getConnection
in interface DataSource
getConnection
in class DelegatingDataSource
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |