Class PoolablePreparedStatement<K>

    • Constructor Detail

      • PoolablePreparedStatement

        public PoolablePreparedStatement​(java.sql.PreparedStatement stmt,
                                         K key,
                                         org.apache.commons.pool2.KeyedObjectPool<K,​PoolablePreparedStatement<K>> pool,
                                         DelegatingConnection<?> conn)
        Constructs a new instance.
        Parameters:
        stmt - my underlying PreparedStatement
        key - my key as used by KeyedObjectPool
        pool - the KeyedObjectPool from which I was obtained.
        conn - the Connection from which I was created
    • Method Detail

      • activate

        public void activate()
                      throws java.sql.SQLException
        Description copied from class: DelegatingStatement
        Activates this instance by delegating to the underlying statement.
        Overrides:
        activate in class DelegatingStatement
        Throws:
        java.sql.SQLException - thrown by the delegating statement.
      • addBatch

        public void addBatch()
                      throws java.sql.SQLException
        Add batch.
        Specified by:
        addBatch in interface java.sql.PreparedStatement
        Overrides:
        addBatch in class DelegatingPreparedStatement
        Throws:
        java.sql.SQLException
      • clearBatch

        public void clearBatch()
                        throws java.sql.SQLException
        Clear Batch.
        Specified by:
        clearBatch in interface java.sql.Statement
        Overrides:
        clearBatch in class DelegatingStatement
        Throws:
        java.sql.SQLException
      • close

        public void close()
                   throws java.sql.SQLException
        Return me to my pool.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.sql.Statement
        Overrides:
        close in class DelegatingStatement
        Throws:
        java.sql.SQLException - Ignored here, for subclasses.
      • passivate

        public void passivate()
                       throws java.sql.SQLException
        Description copied from class: DelegatingStatement
        Passivates this instance by delegating to the underlying statement.
        Overrides:
        passivate in class DelegatingStatement
        Throws:
        java.sql.SQLException - thrown by the delegating statement.