Interface BatchedResultChecker
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Checks the result for one row in a JDBC batch.
The checker gives higher-level mutation code a row-specific hook for handling
optimistic-lock and stale-state outcomes after JDBC batch execution. It is
associated with a row when that row is added to a SingleStatementBatch.
Implementations return true when the observed outcome is acceptable and
false when the batch should keep treating the row as a stale-state failure.
A thrown SQLException is converted by the owning batch.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckResult(int affectedRowCount, int batchPosition, String sqlString, SessionFactoryImplementor sessionFactory) Check the result for one row of a JDBC batch.
-
Method Details
-
checkResult
boolean checkResult(int affectedRowCount, int batchPosition, String sqlString, SessionFactoryImplementor sessionFactory) throws SQLException Check the result for one row of a JDBC batch.- Parameters:
affectedRowCount- the row count reported for this batch entrybatchPosition- zero-based position of the row within the executed JDBC batchsqlString- SQL string for the batch statementsessionFactory- the session factory associated with execution- Returns:
trueif the result is acceptable,falseto keep treating it as a stale-state failure- Throws:
SQLException- if result checking needs to report a JDBC failure
-