Package org.hibernate.jdbc
Class Expectation.None
- java.lang.Object
-
- org.hibernate.jdbc.Expectation.None
-
- All Implemented Interfaces:
Expectation
- Enclosing interface:
- Expectation
public static class Expectation.None extends Object implements Expectation
No return code checking. Might mean that no checks are required, or that failure is indicated by aSQLExceptionbeing thrown, for example, by astored procedurewhich performs explicit checks.- Since:
- 6.5
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.jdbc.Expectation
Expectation.None, Expectation.OutParameter, Expectation.RowCount
-
-
Constructor Summary
Constructors Constructor Description None()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidverifyOutcome(int rowCount, PreparedStatement statement, int batchPosition, String sql)Perform verification of the outcome of the JDBC operation based on the type of expectation defined, after execution of the givenPreparedStatement.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.jdbc.Expectation
canBeBatched, getNumberOfParametersUsed, prepare, validate
-
-
-
-
Method Detail
-
verifyOutcome
public void verifyOutcome(int rowCount, PreparedStatement statement, int batchPosition, String sql)Description copied from interface:ExpectationPerform verification of the outcome of the JDBC operation based on the type of expectation defined, after execution of the givenPreparedStatement. When a SQL statement is executed viaPreparedStatement.executeUpdate(),verifyOutcome()is called exactly once. WhenStatement.executeBatch()is used to execute a batch update, this method is called once for each element of the batch.- The argument to
rowCountis usually the number of table rows affected by execution of the SQL statement viaexecuteUpdate(). However, in the case whereexecuteBatch()is used to execute a batch update, it might beStatement.EXECUTE_FAILEDorStatement.SUCCESS_NO_INFO. - The argument to
batchPositionis negative unlessexecuteBatch()is used to execute a batch update, in which case it is the position within the batch of the row count being verified.
- Specified by:
verifyOutcomein interfaceExpectation- Parameters:
rowCount- The RDBMS reported "number of rows affected"statement- The statement representing the operationbatchPosition- The position in the batch (if batching), or-1if not part of a batchsql- The SQL backing the prepared statement, for error reporting and logging purposes- See Also:
PreparedStatement.executeUpdate(),Statement.executeBatch()
- The argument to
-
-