org.hibernate.jdbc
Class Expectations.BasicParamExpectation

java.lang.Object
  extended by org.hibernate.jdbc.Expectations.BasicExpectation
      extended by org.hibernate.jdbc.Expectations.BasicParamExpectation
All Implemented Interfaces:
Expectation
Enclosing class:
Expectations

public static class Expectations.BasicParamExpectation
extends Expectations.BasicExpectation


Constructor Summary
protected Expectations.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
verifyOutcome
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expectations.BasicParamExpectation

protected Expectations.BasicParamExpectation(int expectedRowCount,
                                             int parameterPosition)
Method Detail

prepare

public int prepare(PreparedStatement statement)
            throws SQLException,
                   HibernateException
Description copied from interface: Expectation
Perform any special statement preparation.

Specified by:
prepare in interface Expectation
Overrides:
prepare in class Expectations.BasicExpectation
Parameters:
statement - The statement to be prepared
Returns:
The number of bind positions consumed (if any)
Throws:
SQLException - Exception from the JDBC driver
HibernateException - Problem performing preparation.

canBeBatched

public boolean canBeBatched()
Description copied from interface: Expectation
Is it acceptable to combiner this expectation with statement batching?

Specified by:
canBeBatched in interface Expectation
Overrides:
canBeBatched in class 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 class Expectations.BasicExpectation


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.