Top Description Fields Constructors Methods
org.hibernate.engine.jdbc.batch.internal

public Class BatchImpl

extends Object
implements Batch
Class Inheritance
All Implemented Interfaces
org.hibernate.engine.jdbc.batch.spi.Batch
Imports
java.sql.PreparedStatement, .SQLException, java.util.LinkedHashSet, org.hibernate.HibernateException, org.hibernate.engine.jdbc.batch.spi.Batch, .BatchKey, .BatchObserver, org.hibernate.engine.jdbc.mutation.JdbcValueBindings, .TableInclusionChecker, org.hibernate.engine.jdbc.mutation.group.PreparedStatementDetails, .PreparedStatementGroup, org.hibernate.engine.jdbc.spi.JdbcCoordinator, .JdbcServices, .SqlExceptionHelper, .SqlStatementLogger, org.hibernate.event.spi.EventManager, .HibernateMonitoringEvent, org.hibernate.resource.jdbc.spi.JdbcObserver, .JdbcSessionOwner

Standard implementation of Batch
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean
private int
private final int
private final JdbcCoordinator
private final BatchKey
private final LinkedHashSet<BatchObserver>
private final SqlExceptionHelper
private final SqlStatementLogger
private final PreparedStatementGroup

Constructor Summary

AccessConstructor and Description
public
BatchImpl(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator)

Method Summary

Modifier and TypeMethod and Description
protected void
public void
addObserver(BatchObserver
The batch observer.
observer
)

Implements org.hibernate.engine.jdbc.batch.spi.Batch.addObserver.

Adds an observer to this batch.
public void
addToBatch(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker)

Implements org.hibernate.engine.jdbc.batch.spi.Batch.addToBatch.

Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.
private void
checkRowCounts(int[] rowCounts, PreparedStatementDetails statementDetails)

protected void
public void
public final BatchKey
getKey()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.getKey.

Retrieves the object being used to key (uniquely identify) this batch.
public PreparedStatementGroup
protected final void
notifyObserversExplicitExecution()

Convenience method to notify registered observers of an explicit execution of this batch.

protected final void
notifyObserversImplicitExecution()

Convenience method to notify registered observers of an implicit execution of this batch.

protected void
public void
release()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.release.

Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.
protected void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

batchExecutedback to summary
private boolean batchExecuted
batchPositionback to summary
private int batchPosition
batchSizeToUseback to summary
private final int batchSizeToUse
jdbcCoordinatorback to summary
private final JdbcCoordinator jdbcCoordinator
keyback to summary
private final BatchKey key
observersback to summary
private final LinkedHashSet<BatchObserver> observers
sqlExceptionHelperback to summary
private final SqlExceptionHelper sqlExceptionHelper
sqlStatementLoggerback to summary
private final SqlStatementLogger sqlStatementLogger
statementGroupback to summary
private final PreparedStatementGroup statementGroup

Constructor Detail

BatchImplback to summary
public BatchImpl(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator)

Method Detail

abortBatchback to summary
protected void abortBatch(Exception cause)
addObserverback to summary
public void addObserver(BatchObserver observer)

Implements org.hibernate.engine.jdbc.batch.spi.Batch.addObserver.

Doc from org.hibernate.engine.jdbc.batch.spi.Batch.addObserver.

Adds an observer to this batch.

Parameters
observer:BatchObserver

The batch observer.

Annotations
@Override
addToBatchback to summary
public void addToBatch(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker)

Implements org.hibernate.engine.jdbc.batch.spi.Batch.addToBatch.

Doc from org.hibernate.engine.jdbc.batch.spi.Batch.addToBatch.

Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.

Annotations
@Override
checkRowCountsback to summary
private void checkRowCounts(int[] rowCounts, PreparedStatementDetails statementDetails) throws SQLException, HibernateException
clearBatchback to summary
protected void clearBatch(PreparedStatementDetails statementDetails)
executeback to summary
public void execute()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.execute.

Doc from org.hibernate.engine.jdbc.batch.spi.Batch.execute.

Execute this batch.

Annotations
@Override
getKeyback to summary
public final BatchKey getKey()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.getKey.

Doc from org.hibernate.engine.jdbc.batch.spi.Batch.getKey.

Retrieves the object being used to key (uniquely identify) this batch.

Returns:BatchKey

The batch key.

Annotations
@Override
getStatementGroupback to summary
public PreparedStatementGroup getStatementGroup()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.getStatementGroup.

Annotations
@Override
notifyObserversExplicitExecutionback to summary
protected final void notifyObserversExplicitExecution()

Convenience method to notify registered observers of an explicit execution of this batch.

notifyObserversImplicitExecutionback to summary
protected final void notifyObserversImplicitExecution()

Convenience method to notify registered observers of an implicit execution of this batch.

performExecutionback to summary
protected void performExecution()
releaseback to summary
public void release()

Implements org.hibernate.engine.jdbc.batch.spi.Batch.release.

Doc from org.hibernate.engine.jdbc.batch.spi.Batch.release.

Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.

Annotations
@Override
releaseStatementsback to summary
protected void releaseStatements()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override