com.ibm.pdq.runtime.exception
Class UpdateManyException
- java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibm.pdq.runtime.exception.DataRuntimeException
com.ibm.pdq.runtime.exception.UpdateManyException
All implemented interfaces:
public class UpdateManyException extends DataRuntimeExceptionThis exception indicates that an error occurred while performing a batch update.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
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.
|
|
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() .
|
|
setHeterogeneousUpdateCounts(int[][] heteroUpdateCounts)
Sets the
int[][] heteroUpdateCounts to indicate the results from the execution of the SQL.
|
|
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( )
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()
.
Data.endBatch()
, returns anint
array of arrays that describes the results of executing the heterogeneous update with parameters. This is an array of theint[]
s that are returned from the execution of each SQL statement that was added to the batch. Theseint[]
s follow the format that is used for the return value ofStatement.executeBatch()
, which is the format used by pureQuery to return the results of homogeneous batches. If the exception was not thrown while executingData.endBatch()
, this method returnsnull
.