Package org.hibernate.jdbc
Class Expectations.BasicExpectation
java.lang.Object
org.hibernate.jdbc.Expectations.BasicExpectation
- All Implemented Interfaces:
Expectation
- Direct Known Subclasses:
Expectations.BasicParamExpectation
- Enclosing class:
Expectations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs it acceptable to combiner this expectation with statement batching?protected intdetermineRowCount(int reportedRowCount, PreparedStatement statement) intprepare(PreparedStatement statement) Perform any special statement preparation.final voidverifyOutcome(int rowCount, PreparedStatement statement, int batchPosition) Perform verification of the outcome of the RDBMS operation based on the type of expectation defined.
-
Constructor Details
-
BasicExpectation
protected BasicExpectation(int expectedRowCount)
-
-
Method Details
-
verifyOutcome
Description copied from interface:ExpectationPerform verification of the outcome of the RDBMS operation based on the type of expectation defined.- Specified by:
verifyOutcomein interfaceExpectation- Parameters:
rowCount- The RDBMS reported "number of rows affected".statement- The statement representing the operationbatchPosition- The position in the batch (if batching)
-
prepare
Description copied from interface:ExpectationPerform any special statement preparation.- Specified by:
preparein interfaceExpectation- Parameters:
statement- The statement to be prepared- Returns:
- The number of bind positions consumed (if any)
- Throws:
SQLException- Exception from the JDBC driverHibernateException- Problem performing preparation.
-
canBeBatched
public boolean canBeBatched()Description copied from interface:ExpectationIs it acceptable to combiner this expectation with statement batching?- Specified by:
canBeBatchedin interfaceExpectation- Returns:
- True if batching can be combined with this expectation; false otherwise.
-
determineRowCount
-