org.hibernate.jdbc
Class Expectations.BasicExpectation
java.lang.Object
org.hibernate.jdbc.Expectations.BasicExpectation
- Expectations
- Expectation
public static class Expectations.BasicExpectation
extends java.lang.Object
boolean | canBeBatched() - Is it acceptable to combiner this expectation with statement batching?
|
protected int | determineRowCount(int reportedRowCount, PreparedStatement statement)
|
int | prepare(PreparedStatement statement) - Perform any special statement preparation.
|
void | verifyOutcome(int rowCount, PreparedStatement statement, int batchPosition) - Perform verification of the outcome of the RDBMS operation based on
the type of expectation defined.
|
BasicExpectation
protected BasicExpectation(int expectedRowCount)
canBeBatched
public boolean canBeBatched()
Is it acceptable to combiner this expectation with statement batching?
- canBeBatched in interface Expectation
- True if batching can be combined with this expectation; false otherwise.
determineRowCount
protected int determineRowCount(int reportedRowCount,
PreparedStatement statement)
prepare
public int prepare(PreparedStatement statement)
throws SQLException,
HibernateException
Perform any special statement preparation.
- prepare in interface Expectation
statement
- The statement to be prepared
- The number of bind positions consumed (if any)
verifyOutcome
public final void verifyOutcome(int rowCount,
PreparedStatement statement,
int batchPosition)
Perform verification of the outcome of the RDBMS operation based on
the type of expectation defined.
- verifyOutcome in interface Expectation
rowCount
- The RDBMS reported "number of rows affected".statement
- The statement representing the operationbatchPosition
- The position in the batch (if batching)