Save This Page
Home » apache-openjpa-1.1.0-source » org.apache.openjpa.lib » jdbc » [javadoc | source]
org.apache.openjpa.lib.jdbc
public class: DecoratingDataSource [javadoc | source]
java.lang.Object
   org.apache.openjpa.lib.jdbc.DelegatingDataSource
      org.apache.openjpa.lib.jdbc.DecoratingDataSource

All Implemented Interfaces:
    DataSource, Closeable

Direct Known Subclasses:
    DistributedDataSource

Delegating data source that maintains a list of ConnectionDecorator s.
Constructor:
 public DecoratingDataSource(DataSource ds) 
    Constructor. Supply wrapped data source.
Method from org.apache.openjpa.lib.jdbc.DecoratingDataSource Summary:
addDecorator,   addDecorators,   clearDecorators,   getConnection,   getConnection,   getDecorators,   removeDecorator
Methods from org.apache.openjpa.lib.jdbc.DelegatingDataSource:
appendInfo,   close,   equals,   getConnection,   getConnection,   getDelegate,   getInnermostDelegate,   getLogWriter,   getLoginTimeout,   hashCode,   setLogWriter,   setLoginTimeout,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openjpa.lib.jdbc.DecoratingDataSource Detail:
 public  void addDecorator(ConnectionDecorator decorator) 
    Add a connection decorator.
 public  void addDecorators(Collection decorators) 
    Add multiple connection decorators efficiently.
 public  void clearDecorators() 
    Clear all decorators.
 public Connection getConnection() throws SQLException 
 public Connection getConnection(String user,
    String pass) throws SQLException 
 public Collection getDecorators() 
    Return a read-only list of connection decorators in the order they were added.
 public boolean removeDecorator(ConnectionDecorator decorator) 
    Remove a connection decorator.