Class AnnotationBatcher.UpdateBatcher

  • Enclosing class:
    AnnotationBatcher

    static class AnnotationBatcher.UpdateBatcher
    extends Object
    Batcher implementation for updating and deleting from tables.
    • Field Detail

      • sql

        private final String sql
      • parameterTypes

        private final int[] parameterTypes
      • count

        private int count
    • Constructor Detail

      • UpdateBatcher

        UpdateBatcher​(Connection c,
                      String sql,
                      int... parameterTypes)
               throws SQLException
        Prepare a new batcher for the given SQL statement.
        Parameters:
        sql - A SQL statement
        parameterTypes - Parameter type codes as defined in Types.
        Throws:
        SQLException
    • Method Detail

      • getSql

        String getSql()
        The SQL statement this batcher is executing.
      • addToBatch

        void addToBatch​(Object... values)
                 throws SQLException
        Add a new entry to the batch. The number of values must match the number of parameter types.
        Throws:
        SQLException
      • close

        void close()
        Close the batcher.