Class BatchedPstmt

java.lang.Object
io.ebeaninternal.server.persist.BatchedPstmt
All Implemented Interfaces:
SpiProfileTransactionEvent

public final class BatchedPstmt extends Object implements SpiProfileTransactionEvent
A batched statement that is held in BatchedPstmtHolder. It has a list of BatchPostExecute which it will process after the statement is executed.

This can hold CallableStatements as well.

  • Constructor Details

  • Method Details

    • size

      public int size()
      Return the number of batched statements.
    • isEmpty

      public boolean isEmpty()
    • sql

      public String sql()
      Return the sql
    • statement

      public PreparedStatement statement(BatchPostExecute postExecute) throws SQLException
      Return the statement adding the postExecute task.
      Throws:
      SQLException
    • add

      public void add(BatchPostExecute batchExecute)
      Add the BatchPostExecute to the list for post execute processing.
    • executeBatch

      public void executeBatch(boolean getGeneratedKeys) throws SQLException
      Execute the statement using executeBatch(). Run any post processing including getGeneratedKeys.
      Throws:
      SQLException
    • profile

      public void profile()
      Description copied from interface: SpiProfileTransactionEvent
      Add the event information to the profiling transaction.
      Specified by:
      profile in interface SpiProfileTransactionEvent
    • close

      public void close()
      Close the underlying statement.
    • results

      public int[] results()
      Return the execution results (row counts).
    • registerInputStreams

      public void registerInputStreams(List<InputStream> streams)
      Register any inputStreams that should be closed after execution.