BatchingBatch (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.engine.jdbc.batch.internal
Class BatchingBatch

    java.lang.Object
      org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl
          org.hibernate.engine.jdbc.batch.internal.BatchingBatch

All Implemented Interfaces:
  Batch

    public class BatchingBatch

extends AbstractBatchImpl

A `Batch` implementation which does bathing based on a given size. Once the batch size is reached for a statement in the batch, the entire batch is implicitly executed.

Constructor Summary
`BatchingBatch(BatchKey key, JdbcCoordinator jdbcCoordinator, int batchSize)`

Method Summary
`void` | `addToBatch()` Indicates completion of the current part of the batch.
`protected void` | `doExecuteBatch()` Perform batch execution.
`PreparedStatement` | `getBatchStatement(String sql, boolean callable)` Get a statement which is part of the batch, creating if necessary (and storing for next time).

Methods inherited from class org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl
`addObserver, execute, getKey, getStatements, notifyObserversExplicitExecution, notifyObserversImplicitExecution, release, sqlExceptionHelper, sqlStatementLogger`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BatchingBatch

    public BatchingBatch(BatchKey key,
                         JdbcCoordinator jdbcCoordinator,
                         int batchSize)

Method Detail

### getBatchStatement

    public PreparedStatement getBatchStatement(String sql,
                                               boolean callable)

  Description copied from interface: `Batch`
  Get a statement which is part of the batch, creating if necessary (and storing for next time).

  Specified by:
    `getBatchStatement` in interface `Batch`
  Overrides:
    `getBatchStatement` in class `AbstractBatchImpl`
  Parameters:
    `sql` - The SQL statement.
    `callable` - Is the SQL statement callable?
  Returns:
    The prepared statement instance, representing the SQL statement.

### addToBatch

    public void addToBatch()

  Description copied from interface: `Batch`
  Indicates completion of the current part of the batch.

### doExecuteBatch

    protected void doExecuteBatch()

  Description copied from class: `AbstractBatchImpl`
  Perform batch execution.

  This is called from the explicit `execution`, but may also be called from elsewhere depending on the exact implementation.

  Specified by:
    `doExecuteBatch` in class `AbstractBatchImpl`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.