Expectations.BasicExpectation (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public static class Expectations.BasicExpectation

extends Object
implements Expectation

Constructor Summary
`protected` | `Expectations.BasicExpectation(int expectedRowCount)`

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.
`void` | `verifyOutcome(int rowCount, PreparedStatement statement, int batchPosition)` Perform verification of the outcome of the RDBMS operation based on the type of expectation defined.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Expectations.BasicExpectation

    protected Expectations.BasicExpectation(int expectedRowCount)

Method Detail

### verifyOutcome

    public final void verifyOutcome(int rowCount,
                                    PreparedStatement statement,
                                    int batchPosition)

  Description copied from interface: `Expectation`
  Perform verification of the outcome of the RDBMS operation based on the type of expectation defined.

  Specified by:
    `verifyOutcome` in interface `Expectation`
  Parameters:
    `rowCount` - The RDBMS reported "number of rows affected".
    `statement` - The statement representing the operation
    `batchPosition` - The position in the batch (if batching)

### 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`
  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`
  Returns:
    True if batching can be combined with this expectation; false otherwise.

### determineRowCount

    protected int determineRowCount(int reportedRowCount,
                                    PreparedStatement statement)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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