Open Source Repository

Home /hibernate/hibernate-3.2.6.ga | Repository Home



org/hibernate/jdbc/NonBatchingBatcher.java
//$Id: NonBatchingBatcher.java 10040 2006-06-22 19:51:43Z [email protected] $
package org.hibernate.jdbc;

import java.sql.PreparedStatement;
import java.sql.SQLException;

import org.hibernate.HibernateException;
import org.hibernate.Interceptor;

/**
 * An implementation of the <tt>Batcher</tt> interface that does no batching
 *
 @author Gavin King
 */
public class NonBatchingBatcher extends AbstractBatcher {

  public NonBatchingBatcher(ConnectionManager connectionManager, Interceptor interceptor) {
    superconnectionManager, interceptor );
  }

  public void addToBatch(Expectation expectationthrows SQLException, HibernateException {
    PreparedStatement statement = getStatement();
    final int rowCount = statement.executeUpdate();
    expectation.verifyOutcomerowCount, statement, );
  }

  protected void doExecuteBatch(PreparedStatement psthrows SQLException, HibernateException {
  }

}