Class SimpleStatement

java.lang.Object
org.dbunit.database.statement.AbstractBatchStatement
org.dbunit.database.statement.SimpleStatement
All Implemented Interfaces:
IBatchStatement

public class SimpleStatement extends AbstractBatchStatement
IBatchStatement that executes plain (non-prepared) SQL statements.
Since:
Feb 20, 2002
Version:
$Revision$
Author:
Manuel Laflamme
  • Method Details

    • addBatch

      public void addBatch(String sql) throws SQLException
      Description copied from interface: IBatchStatement
      Adds a SQL statement to the current batch.
      Parameters:
      sql - the SQL statement to add.
      Throws:
      SQLException - if a database access error occurs.
    • executeBatch

      public int executeBatch() throws SQLException
      Description copied from interface: IBatchStatement
      Executes the accumulated batch of SQL statements.
      Returns:
      the number of rows affected, summed across the batch.
      Throws:
      SQLException - if a database access error occurs.
    • clearBatch

      public void clearBatch() throws SQLException
      Description copied from interface: IBatchStatement
      Discards the accumulated batch of SQL statements without executing them.
      Throws:
      SQLException - if a database access error occurs.