public static class

Expectations.BasicExpectation

extends Object
implements Expectation
java.lang.Object
   ↳ org.hibernate.jdbc.Expectations.BasicExpectation
Known Direct Subclasses

Summary

Protected Constructors
Expectations.BasicExpectation(int expectedRowCount)
Public Methods
boolean canBeBatched()
Is it acceptable to combiner this expectation with statement batching?
int prepare(PreparedStatement statement)
Perform any special statement preparation.
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.
Protected Methods
int determineRowCount(int reportedRowCount, PreparedStatement statement)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.jdbc.Expectation

Protected Constructors

protected Expectations.BasicExpectation (int expectedRowCount)

Public Methods

public boolean canBeBatched ()

Is it acceptable to combiner this expectation with statement batching?

Returns
  • True if batching can be combined with this expectation; false otherwise.

public int prepare (PreparedStatement statement)

Perform any special statement preparation.

Parameters
statement The statement to be prepared
Returns
  • The number of bind positions consumed (if any)

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.

Parameters
rowCount The RDBMS reported "number of rows affected".
statement The statement representing the operation
batchPosition The position in the batch (if batching)

Protected Methods

protected int determineRowCount (int reportedRowCount, PreparedStatement statement)