Top Description Fields Constructors Methods
org.hibernate.jdbc

public Class BatchingBatcher

extends AbstractBatcher
Class Inheritance
Imports
java.sql.PreparedStatement, .SQLException, org.hibernate.HibernateException, .Interceptor

An implementation of the Batcher interface that actually uses batching
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private int
private Expectation[]
Inherited from org.hibernate.jdbc.AbstractBatcher:
isTransactionTimeoutSetlog

Constructor Summary

AccessConstructor and Description
public
BatchingBatcher(ConnectionManager connectionManager, Interceptor interceptor)

Method Summary

Modifier and TypeMethod and Description
public void
addToBatch(Expectation expectation)

Implements org.hibernate.jdbc.Batcher.addToBatch.

Add an insert / delete / update to the current batch (might be called multiple times for single prepareBatchStatement())
private void
checkRowCounts(int[] rowCounts, PreparedStatement ps)

protected void
Inherited from org.hibernate.jdbc.AbstractBatcher:
abortBatchcancelLastQuerycloseConnectioncloseQueryStatementcloseStatementcloseStatementsexecuteBatchgetFactorygetResultSetgetResultSetgetStatementhasOpenResourcesopenConnectionopenResourceStatsAsStringprepareBatchCallableStatementprepareBatchStatementprepareCallableQueryStatementprepareCallableStatementprepareQueryStatementprepareSelectStatementprepareStatementprepareStatementprepareStatementsetTransactionTimeoutunsetTransactionTimeout

Field Detail

batchSizeback to summary
private int batchSize
expectationsback to summary
private Expectation[] expectations

Constructor Detail

BatchingBatcherback to summary
public BatchingBatcher(ConnectionManager connectionManager, Interceptor interceptor)

Method Detail

addToBatchback to summary
public void addToBatch(Expectation expectation) throws SQLException, HibernateException

Implements org.hibernate.jdbc.Batcher.addToBatch.

Doc from org.hibernate.jdbc.Batcher.addToBatch.

Add an insert / delete / update to the current batch (might be called multiple times for single prepareBatchStatement())

checkRowCountsback to summary
private void checkRowCounts(int[] rowCounts, PreparedStatement ps) throws SQLException, HibernateException
doExecuteBatchback to summary
protected void doExecuteBatch(PreparedStatement ps) throws SQLException, HibernateException

Implements abstract org.hibernate.jdbc.AbstractBatcher.doExecuteBatch.