public class BatchedPstmt extends Object
This can hold CallableStatements as well.
| Constructor and Description |
|---|
BatchedPstmt(PreparedStatement pstmt,
boolean isGenKeys,
String sql,
PstmtBatch pstmtBatch,
boolean occCheck)
Create with a given statement.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(BatchPostExecute batchExecute)
Add the BatchPostExecute to the list for post execute processing.
|
void |
close()
Close the underlying statement.
|
void |
executeBatch(boolean getGeneratedKeys)
Execute the statement using executeBatch().
|
String |
getSql()
Return the sql
|
PreparedStatement |
getStatement()
Return the statement.
|
int |
size()
Return the number of batched statements.
|
public BatchedPstmt(PreparedStatement pstmt, boolean isGenKeys, String sql, PstmtBatch pstmtBatch, boolean occCheck)
isGenKeys - true if an insert that uses generatedKeyspublic int size()
public String getSql()
public PreparedStatement getStatement()
public void add(BatchPostExecute batchExecute)
public void executeBatch(boolean getGeneratedKeys)
throws SQLException
SQLExceptionpublic void close()
throws SQLException
SQLExceptionCopyright © 2014. All Rights Reserved.