java.lang.Object
io.ebeaninternal.server.persist.BatchedPstmtHolder
Used to hold BatchedPstmt objects for batch based execution.
The BatchControl 'front ends' the batching by queuing the persist requests and ordering them according to depth and type. This object should only batch statements of a single 'depth' at any given time.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStmt(BatchedPstmt bs, BatchPostExecute postExecute) Add a new PreparedStatement wrapped in the BatchStatement object.batchedPstmt(String stmtKey) Return the BatchedPstmt that holds the batched statement.voidclear()int[]Execute one of the batched statements returning the row counts.voidflush(boolean getGeneratedKeys, boolean reset) Execute all batched PreparedStatements.booleanisEmpty()Return true if the batch has no statements to execute.
-
Method Details
-
batchedPstmt
Return the BatchedPstmt that holds the batched statement. -
addStmt
Add a new PreparedStatement wrapped in the BatchStatement object. -
isEmpty
public boolean isEmpty()Return true if the batch has no statements to execute. -
execute
Execute one of the batched statements returning the row counts.- Throws:
SQLException
-
flush
Execute all batched PreparedStatements.- Throws:
BatchedSqlException
-
clear
public void clear()
-