org.hibernate.jdbc

Class Expectations.BasicParamExpectation

Enclosing Class:
Expectations
Implemented Interfaces:
Expectation

public static class Expectations.BasicParamExpectation
extends Expectations.BasicExpectation

Constructor Summary

BasicParamExpectation(int expectedRowCount, int parameterPosition)

Method Summary

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.

Methods inherited from class org.hibernate.jdbc.Expectations.BasicExpectation

canBeBatched, determineRowCount, prepare, verifyOutcome

Constructor Details

BasicParamExpectation

protected BasicParamExpectation(int expectedRowCount,
                                int parameterPosition)

Method Details

canBeBatched

public boolean canBeBatched()
Is it acceptable to combiner this expectation with statement batching?
Specified by:
canBeBatched in interface Expectation
Overrides:
canBeBatched in interface Expectations.BasicExpectation
Returns:
True if batching can be combined with this expectation; false otherwise.

determineRowCount

protected int determineRowCount(int reportedRowCount,
                                PreparedStatement statement)
Overrides:
determineRowCount in interface Expectations.BasicExpectation

prepare

public int prepare(PreparedStatement statement)
            throws SQLException,
                   HibernateException
Perform any special statement preparation.
Specified by:
prepare in interface Expectation
Overrides:
prepare in interface Expectations.BasicExpectation
Parameters:
statement - The statement to be prepared
Returns:
The number of bind positions consumed (if any)
Throws:
HibernateException - Problem performing preparation.