Package org.springframework.jdbc.core
Class AggregatedBatchUpdateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.BatchUpdateException
org.springframework.jdbc.core.AggregatedBatchUpdateException
- All Implemented Interfaces:
Serializable,Iterable<Throwable>
A
BatchUpdateException that provides additional information about
batches that were successful prior to one failing.- Since:
- 6.2
- Author:
- Stephane Nicoll
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAggregatedBatchUpdateException(int[][] successfulUpdateCounts, BatchUpdateException original) Create an aggregated exception with the batches that have completed prior to the givencause. -
Method Summary
Modifier and TypeMethodDescriptionReturn the originalBatchUpdateExceptionthat this exception aggregates.int[][]Return the batches that have completed successfully, prior to this exception.Methods inherited from class java.sql.BatchUpdateException
getLargeUpdateCounts, getUpdateCountsMethods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AggregatedBatchUpdateException
public AggregatedBatchUpdateException(int[][] successfulUpdateCounts, BatchUpdateException original) Create an aggregated exception with the batches that have completed prior to the givencause.- Parameters:
successfulUpdateCounts- the counts of the batches that run successfullyoriginal- the exception this instance aggregates
-
-
Method Details
-
getSuccessfulUpdateCounts
public int[][] getSuccessfulUpdateCounts()Return the batches that have completed successfully, prior to this exception.Information about the batch that failed is available via
BatchUpdateException.getUpdateCounts().- Returns:
- an array containing for each batch another array containing the numbers of rows affected by each update in the batch
- See Also:
-
getOriginalException
Return the originalBatchUpdateExceptionthat this exception aggregates.- Returns:
- the original exception
-