|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.
Constructor Summary | |
---|---|
DecoratingDataSource(javax.sql.DataSource ds)
Constructor. |
Method Summary | |
---|---|
void |
addDecorator(ConnectionDecorator decorator)
Add a connection decorator. |
void |
addDecorators(java.util.Collection<ConnectionDecorator> decorators)
Add multiple connection decorators efficiently. |
void |
clearDecorators()
Clear all decorators. |
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String pass)
|
java.util.Collection<ConnectionDecorator> |
getDecorators()
Return a read-only list of connection decorators in the order they were added. |
static DecoratingDataSource |
newDecoratingDataSource(javax.sql.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(javax.sql.DataSource ds)
Method Detail |
---|
public static DecoratingDataSource newDecoratingDataSource(javax.sql.DataSource ds)
public java.util.Collection<ConnectionDecorator> getDecorators()
public void addDecorator(ConnectionDecorator decorator)
public void addDecorators(java.util.Collection<ConnectionDecorator> decorators)
public boolean removeDecorator(ConnectionDecorator decorator)
public void clearDecorators()
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class DelegatingDataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String user, java.lang.String pass) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
getConnection
in class DelegatingDataSource
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |