com.ibm.pdq.runtime.exception

Class UpdateManyException

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended byjava.lang.RuntimeException
  5. extended bycom.ibm.pdq.runtime.exception.DataRuntimeException
  6. extended bycom.ibm.pdq.runtime.exception.UpdateManyException
All implemented interfaces:
Serializable

public class UpdateManyException
extends DataRuntimeException
This exception indicates that an error occurred while performing a batch update.
See Also:
BatchUpdateException, Serialized Form

Method Summary

Modifier and Type Method and Description
  1. int[][]
getHeterogeneousUpdateCounts()
If the exception was thrown while executing Data.endBatch(), returns an int array of arrays that describes the results of executing the heterogeneous update with parameters.
  1. int[]
getUpdateCounts()
Returns an int[] that provides the update counts for the execution of the SQL in the format that is used for the return value of Statement.executeBatch().
  1. void
setHeterogeneousUpdateCounts(int[][] heteroUpdateCounts)
Sets the int[][] heteroUpdateCounts to indicate the results from the execution of the SQL.
  1. void
setUpdateCounts(int[] updateCounts)
Sets the int[] updateCounts to indicate the update counts from the execution of the SQL.
Methods inherited from class com.ibm.pdq.runtime.exception.DataRuntimeException
addLastException, getErrorCode, getErrorType, getExceptionLocation, getMessage, getNextException, getProductVersion, getSQLState, isTransient
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getHeterogeneousUpdateCounts

public int[][] getHeterogeneousUpdateCounts(
)
If the exception was thrown while executing Data.endBatch(), returns an int array of arrays that describes the results of executing the heterogeneous update with parameters. This is an array of the int[]s that are returned from the execution of each SQL statement that was added to the batch. These int[]s follow the format that is used for the return value of Statement.executeBatch(), which is the format used by pureQuery to return the results of homogeneous batches. If the exception was not thrown while executing Data.endBatch(), this method returns null.
Returns:
an int array of arrays that describes the results of executing the heterogeneous update with parameters if the exception was thrown while executing Data.endBatch(). If the exception was not thrown while executing Data.endBatch(), this method returns null.

getUpdateCounts

public int[] getUpdateCounts()
Returns an int[] that provides the update counts for the execution of the SQL in the format that is used for the return value of Statement.executeBatch().
Returns:
an int[] that provides the update counts for the execution of the SQL in the format that is used for the return value of Statement.executeBatch()

setHeterogeneousUpdateCounts

public void setHeterogeneousUpdateCounts(
int[][] heteroUpdateCounts)
Sets the int[][] heteroUpdateCounts to indicate the results from the execution of the SQL.
Parameters:
heteroUpdateCounts - an int[][] that describes the results of the execution of the SQL

setUpdateCounts

public void setUpdateCounts(int[] updateCounts)
Sets the int[] updateCounts to indicate the update counts from the execution of the SQL. This can be, for example, the value that is returned by BatchUpdateException.getUpdateCounts() to indicate for each of the SQL statements in a batch of SQL statements (a) whether the SQL statement executed properly, and (b) if it executed properly, how many rows were updated.
Parameters:
updateCounts - an int[] that contains the update counts from the execution of the SQL. This can be set, for example, with the value that is returned by BatchUpdateException.getUpdateCounts() to indicate for each of the SQL statements in a batch of SQL statements (a) whether the SQL statement executed properly, and (b) if it executed properly, how many rows were updated. This int[] can be viewed by calling getUpdateCounts().