GeezerVison is showing docs.oracle.com — BatchUpdateException (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact2, compact3
java.sql
Class BatchUpdateException
-
-
Constructor Summary
Constructors
| Constructor |
Description |
BatchUpdateException() |
Constructs a BatchUpdateException object.
|
BatchUpdateException(int[] updateCounts) |
Constructs a BatchUpdateException object initialized with a given
updateCounts.
|
BatchUpdateException(int[] updateCounts,
Throwable cause) |
Constructs a BatchUpdateException object initialized with a
given cause and updateCounts.
|
BatchUpdateException(String reason,
int[] updateCounts) |
Constructs a BatchUpdateException object initialized with a given
reason and updateCounts.
|
BatchUpdateException(String reason,
int[] updateCounts,
Throwable cause) |
Constructs a BatchUpdateException object initialized with
a given reason, cause
and updateCounts.
|
BatchUpdateException(String reason,
String SQLState,
int[] updateCounts) |
Constructs a BatchUpdateException object initialized with a given
reason, SQLState and
updateCounts.
|
BatchUpdateException(String reason,
String SQLState,
int[] updateCounts,
Throwable cause) |
Constructs a BatchUpdateException object initialized with
a given reason, SQLState,cause, and
updateCounts.
|
BatchUpdateException(String reason,
String SQLState,
int vendorCode,
int[] updateCounts) |
Constructs a BatchUpdateException object initialized with a given
reason, SQLState, vendorCode and
updateCounts.
|
BatchUpdateException(String reason,
String SQLState,
int vendorCode,
int[] updateCounts,
Throwable cause) |
Constructs a BatchUpdateException object initialized with
a given reason, SQLState, vendorCode
cause and updateCounts.
|
BatchUpdateException(String reason,
String SQLState,
int vendorCode,
long[] updateCounts,
Throwable cause) |
Constructs a BatchUpdateException object initialized with
a given reason, SQLState, vendorCode
cause and updateCounts.
|
BatchUpdateException(Throwable cause) |
Constructs a BatchUpdateException object initialized with
a given cause.
|
-
Method Summary
All Methods Instance Methods Concrete Methods
| Modifier and Type |
Method |
Description |
long[] |
getLargeUpdateCounts() |
Retrieves the update count for each update statement in the batch
update that executed successfully before this exception occurred.
|
int[] |
getUpdateCounts() |
Retrieves the update count for each update statement in the batch
update that executed successfully before this exception occurred.
|
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
Constructor Detail
-
BatchUpdateException
public BatchUpdateException(Throwable cause)
Constructs a BatchUpdateException object initialized with
a given cause.
The SQLState and updateCounts
are initialized
to null and the vendor code is initialized to 0.
The reason is initialized to null if
cause==null or to cause.toString() if
cause!=null.
- Parameters:
cause - the underlying reason for this SQLException
(which is saved for later retrieval by the getCause() method);
may be null indicating the cause is non-existent or unknown.
- Since:
- 1.6
- See Also:
BatchUpdateException(java.lang.String, java.lang.String, int, long[],
java.lang.Throwable)
-
BatchUpdateException
public BatchUpdateException(String reason,
String SQLState,
int[] updateCounts,
Throwable cause)
Constructs a BatchUpdateException object initialized with
a given reason, SQLState,cause, and
updateCounts. The vendor code is initialized to 0.
- Parameters:
reason - a description of the exception
SQLState - an XOPEN or SQL:2003 code identifying the exception
updateCounts - an array of int, with each element
indicating the update count, Statement.SUCCESS_NO_INFO or
Statement.EXECUTE_FAILED for each SQL command in
the batch for JDBC drivers that continue processing
after a command failure; an update count or
Statement.SUCCESS_NO_INFO for each SQL command in the batch
prior to the failure for JDBC drivers that stop processing after a command
failure
Note: There is no validation of updateCounts for
overflow and because of this it is recommended that you use the constructor
BatchUpdateException(String reason, String SQLState,
int vendorCode, long []updateCounts,Throwable cause) .
cause - the underlying reason for this SQLException
(which is saved for later retrieval by the getCause() method);
may be null indicating
the cause is non-existent or unknown.
- Since:
- 1.6
- See Also:
BatchUpdateException(java.lang.String, java.lang.String, int, long[],
java.lang.Throwable)
-
BatchUpdateException
public BatchUpdateException(String reason,
String SQLState,
int vendorCode,
int[] updateCounts,
Throwable cause)
Constructs a BatchUpdateException object initialized with
a given reason, SQLState, vendorCode
cause and updateCounts.
- Parameters:
reason - a description of the error
SQLState - an XOPEN or SQL:2003 code identifying the exception
vendorCode - an exception code used by a particular
database vendor
updateCounts - an array of int, with each element
indicating the update count, Statement.SUCCESS_NO_INFO or
Statement.EXECUTE_FAILED for each SQL command in
the batch for JDBC drivers that continue processing
after a command failure; an update count or
Statement.SUCCESS_NO_INFO for each SQL command in the batch
prior to the failure for JDBC drivers that stop processing after a command
failure
Note: There is no validation of updateCounts for
overflow and because of this it is recommended that you use the constructor
BatchUpdateException(String reason, String SQLState,
int vendorCode, long []updateCounts,Throwable cause) .
cause - the underlying reason for this SQLException (which is saved for later retrieval by the getCause() method);
may be null indicating
the cause is non-existent or unknown.
- Since:
- 1.6
- See Also:
BatchUpdateException(java.lang.String, java.lang.String, int, long[],
java.lang.Throwable)
-
BatchUpdateException
public BatchUpdateException(String reason,
String SQLState,
int vendorCode,
long[] updateCounts,
Throwable cause)
Constructs a BatchUpdateException object initialized with
a given reason, SQLState, vendorCode
cause and updateCounts.
This constructor should be used when the returned update count may exceed
Integer.MAX_VALUE.
- Parameters:
reason - a description of the error
SQLState - an XOPEN or SQL:2003 code identifying the exception
vendorCode - an exception code used by a particular
database vendor
updateCounts - an array of long, with each element
indicating the update count, Statement.SUCCESS_NO_INFO or
Statement.EXECUTE_FAILED for each SQL command in
the batch for JDBC drivers that continue processing
after a command failure; an update count or
Statement.SUCCESS_NO_INFO for each SQL command in the batch
prior to the failure for JDBC drivers that stop processing after a command
failure
cause - the underlying reason for this SQLException
(which is saved for later retrieval by the getCause() method);
may be null indicating the cause is non-existent or unknown.
- Since:
- 1.8
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|