org.hibernate.jdbc
Interface Expectation
- Expectations.BasicExpectation, Expectations.BasicParamExpectation
public interface Expectation
Defines an expected DML operation outcome.
boolean | canBeBatched() - Is it acceptable to combiner this expectation with statement batching?
|
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.
|
canBeBatched
public boolean canBeBatched()
Is it acceptable to combiner this expectation with statement batching?
- True if batching can be combined with this expectation; false otherwise.
prepare
public int prepare(PreparedStatement statement)
throws SQLException,
HibernateException
Perform any special statement preparation.
statement
- The statement to be prepared
- The number of bind positions consumed (if any)
verifyOutcome
public void verifyOutcome(int rowCount,
PreparedStatement statement,
int batchPosition)
throws SQLException,
HibernateException
Perform verification of the outcome of the RDBMS operation based on
the type of expectation defined.
rowCount
- The RDBMS reported "number of rows affected".statement
- The statement representing the operationbatchPosition
- The position in the batch (if batching)