
org.hibernate.jdbc.NonBatchingBatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate Show documentation
Show all versions of hibernate Show documentation
Relational Persistence for 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 Batcher interface that does no batching
*
* @author Gavin King
*/
public class NonBatchingBatcher extends AbstractBatcher {
public NonBatchingBatcher(ConnectionManager connectionManager, Interceptor interceptor) {
super( connectionManager, interceptor );
}
public void addToBatch(Expectation expectation) throws SQLException, HibernateException {
PreparedStatement statement = getStatement();
final int rowCount = statement.executeUpdate();
expectation.verifyOutcome( rowCount, statement, 0 );
}
protected void doExecuteBatch(PreparedStatement ps) throws SQLException, HibernateException {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy