Package org.hibernate.jdbc
Class Expectation.None
java.lang.Object
org.hibernate.jdbc.Expectation.None
- All Implemented Interfaces:
Expectation
- Enclosing interface:
Expectation
No return code checking. Might mean that no checks are required, or that
failure is indicated by a
SQLException being thrown, for
example, by a stored procedure which
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 -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidverifyOutcome(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, waitMethods inherited from interface org.hibernate.jdbc.Expectation
canBeBatched, getNumberOfParametersUsed, prepare, validate
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
None
public None()
-
-
Method Details
-
verifyOutcome
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:
- The argument to
-