Interface IPreparedBatchStatement

All Known Implementing Classes:
AbstractPreparedBatchStatement, AutomaticPreparedBatchStatement, BatchStatementDecorator, PreparedBatchStatement, SimplePreparedStatement

public interface IPreparedBatchStatement
A batched, parameterized JDBC statement to which typed column values are bound before execution.
Since:
Mar 15, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds the currently bound parameters as a new row to the batch.
    void
    addValue(Object value, DataType dataType)
    Binds the given value, cast using the given data type, to the next parameter of the statement.
    void
    Clears all batched rows.
    void
    Closes this statement.
    int
    Executes all batched rows.
  • Method Details

    • addValue

      void addValue(Object value, DataType dataType) throws TypeCastException, SQLException
      Binds the given value, cast using the given data type, to the next parameter of the statement.
      Parameters:
      value - the value to bind.
      dataType - the data type used to cast the value.
      Throws:
      TypeCastException - if the value cannot be cast to the given data type.
      SQLException - if binding the value to the statement fails.
    • addBatch

      void addBatch() throws SQLException
      Adds the currently bound parameters as a new row to the batch.
      Throws:
      SQLException - if adding the batch row fails.
    • executeBatch

      int executeBatch() throws SQLException
      Executes all batched rows.
      Returns:
      the number of rows affected by each batched statement.
      Throws:
      SQLException - if executing the batch fails.
    • clearBatch

      void clearBatch() throws SQLException
      Clears all batched rows.
      Throws:
      SQLException - if clearing the batch fails.
    • close

      void close() throws SQLException
      Closes this statement.
      Throws:
      SQLException - if closing the statement fails.