Class DecoratingDataSource

    • Constructor Detail

      • DecoratingDataSource

        public DecoratingDataSource​(javax.sql.DataSource ds)
        Constructor. Supply wrapped data source.
    • Method Detail

      • getDecorators

        public java.util.Collection<ConnectionDecorator> getDecorators()
        Return a read-only list of connection decorators in the order they were added.
      • addDecorator

        public void addDecorator​(ConnectionDecorator decorator)
        Add a connection decorator.
      • addDecorators

        public void addDecorators​(java.util.Collection<ConnectionDecorator> decorators)
        Add multiple connection decorators efficiently.
      • removeDecorator

        public boolean removeDecorator​(ConnectionDecorator decorator)
        Remove a connection decorator.
      • clearDecorators

        public void clearDecorators()
        Clear all decorators.
      • 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