Interface Expectation

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canBeBatched()
      Is it acceptable to combiner this expectation with statement batching?
      int prepare​(java.sql.PreparedStatement statement)
      Perform any special statement preparation.
      void verifyOutcome​(int rowCount, java.sql.PreparedStatement statement, int batchPosition, java.lang.String statementSQL)
      Perform verification of the outcome of the RDBMS operation based on the type of expectation defined.
    • Method Detail

      • verifyOutcome

        void verifyOutcome​(int rowCount,
                           java.sql.PreparedStatement statement,
                           int batchPosition,
                           java.lang.String statementSQL)
                    throws java.sql.SQLException,
                           HibernateException
        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)
        statementSQL - The SQL backing the prepared statement, for logging purposes
        Throws:
        java.sql.SQLException - Exception from the JDBC driver
        HibernateException - Problem processing the outcome.
      • prepare

        int prepare​(java.sql.PreparedStatement statement)
             throws java.sql.SQLException,
                    HibernateException
        Perform any special statement preparation.
        Parameters:
        statement - The statement to be prepared
        Returns:
        The number of bind positions consumed (if any)
        Throws:
        java.sql.SQLException - Exception from the JDBC driver
        HibernateException - Problem performing preparation.
      • canBeBatched

        boolean canBeBatched()
        Is it acceptable to combiner this expectation with statement batching?
        Returns:
        True if batching can be combined with this expectation; false otherwise.