Package org.dbunit.database.statement
Class BatchStatement
java.lang.Object
org.dbunit.database.statement.AbstractBatchStatement
org.dbunit.database.statement.BatchStatement
- All Implemented Interfaces:
IBatchStatement
IBatchStatement that accumulates plain SQL statements using the JDBC
addBatch()/executeBatch() mechanism.- Since:
- Feb 20, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Field Summary
Fields inherited from class org.dbunit.database.statement.AbstractBatchStatement
_statement -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a SQL statement to the current batch.voidDiscards the accumulated batch of SQL statements without executing them.intExecutes the accumulated batch of SQL statements.Methods inherited from class org.dbunit.database.statement.AbstractBatchStatement
close
-
Method Details
-
addBatch
Description copied from interface:IBatchStatementAdds a SQL statement to the current batch.- Parameters:
sql- the SQL statement to add.- Throws:
SQLException- if a database access error occurs.
-
executeBatch
Description copied from interface:IBatchStatementExecutes 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
Description copied from interface:IBatchStatementDiscards the accumulated batch of SQL statements without executing them.- Throws:
SQLException- if a database access error occurs.
-