All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.jdbc.TooManyRowsAffectedException Maven / Gradle / Ivy

There is a newer version: 3.6.0.Beta2
Show newest version
package org.hibernate.jdbc;

import org.hibernate.HibernateException;

/**
 * Indicates that more rows were affected then we were expecting to be.
 * Typically indicates presence of duplicate "PK" values in the
 * given table.
 *
 * @author Steve Ebersole
 */
public class TooManyRowsAffectedException extends HibernateException {
	private final int expectedRowCount;
	private final int actualRowCount;

	public TooManyRowsAffectedException(String message, int expectedRowCount, int actualRowCount) {
		super( message );
		this.expectedRowCount = expectedRowCount;
		this.actualRowCount = actualRowCount;
	}

	public int getExpectedRowCount() {
		return expectedRowCount;
	}

	public int getActualRowCount() {
		return actualRowCount;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy