public static class Expectations.BasicExpectation extends Object implements Expectation
| Modifier | Constructor and Description | 
|---|---|
protected  | 
Expectations.BasicExpectation(int expectedRowCount)  | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
protected Expectations.BasicExpectation(int expectedRowCount)
public final void verifyOutcome(int rowCount,
                 PreparedStatement statement,
                 int batchPosition)
ExpectationverifyOutcome in interface ExpectationrowCount - The RDBMS reported "number of rows affected".statement - The statement representing the operationbatchPosition - The position in the batch (if batching)public int prepare(PreparedStatement statement) throws SQLException, HibernateException
Expectationprepare in interface Expectationstatement - The statement to be preparedSQLException - Exception from the JDBC driverHibernateException - Problem performing preparation.public boolean canBeBatched()
ExpectationcanBeBatched in interface Expectationprotected int determineRowCount(int reportedRowCount,
                    PreparedStatement statement)
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.