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:
- 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
Method Summary Return Data Type | Method Name and Description |
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. |
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() . |
void |
setHeterogeneousUpdateCounts(int[][]
heteroUpdateCounts)
Sets the int[][] heteroUpdateCounts to indicate the results from the execution of the SQL. |
void |
setUpdateCounts(int[] updateCounts)
Sets the int[] updateCounts to indicate the update counts from the execution of the SQL. |
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()
.