public class SQLRecoverableException
extends SQLException
| java.lang.Object | ||||
| ↳ | java.lang.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.sql.SQLException | |||
| ↳ | java.sql.SQLRecoverableException | |||
如果应用程序执行一些恢复步骤SQLException试整个事务,或者在分布式事务(事务分支)的情况下,先前失败的操作可能成功的情况下抛出的子类SQLException 。 至少,恢复操作必须包括关闭当前连接并获得新连接。
Public constructors |
|
|---|---|
SQLRecoverableException() 构造一个 |
|
SQLRecoverableException(String reason) 用给定的 |
|
SQLRecoverableException(String reason, String SQLState) 使用给定的 |
|
SQLRecoverableException(String reason, String SQLState, int vendorCode) 构造一个 |
|
SQLRecoverableException(Throwable cause) 用给定的 |
|
SQLRecoverableException(String reason, Throwable cause) 用给定的 |
|
SQLRecoverableException(String reason, String SQLState, Throwable cause) 构造一个 |
|
SQLRecoverableException(String reason, String SQLState, int vendorCode, Throwable cause) 构造一个 |
|
Inherited methods |
|
|---|---|
java.sql.SQLException
|
|
java.lang.Throwable
|
|
java.lang.Object
|
|
java.lang.Iterable
|
|
SQLRecoverableException ()
构造一个SQLRecoverableException对象。 的reason , SQLState被初始化为null和供应商代码被初始化为0。 cause没有初始化,随后可以通过向一个呼叫进行初始化initCause(java.lang.Throwable)方法。
SQLRecoverableException (String reason)
用给定的reason构造一个SQLRecoverableException对象。 SQLState初始化为null ,并将供应商代码初始化为0. cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。
| Parameters | |
|---|---|
reason |
String: a description of the exception |
SQLRecoverableException (String reason, String SQLState)
用给定的reason和SQLState构造一个SQLRecoverableException对象。 cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。 供应商代码初始化为0。
| Parameters | |
|---|---|
reason |
String: a description of the exception |
SQLState |
String: an XOPEN or SQL:2003 code identifying the exception |
SQLRecoverableException (String reason, String SQLState, int vendorCode)
构造一个SQLRecoverableException与给定对象reason , SQLState和vendorCode 。 cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。
| Parameters | |
|---|---|
reason |
String: a description of the exception |
SQLState |
String: an XOPEN or SQL:2003 code identifying the exception |
vendorCode |
int: a database vendor specific exception code |
SQLRecoverableException (Throwable cause)
用给定的cause构造一个SQLRecoverableException对象。 SQLState初始化为null ,并且供应商代码初始化为0. reason初始化为null如果为cause==null或cause.toString()如果为null则初始化为cause!=null 。
| Parameters | |
|---|---|
cause |
Throwable: 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. |
SQLRecoverableException (String reason, Throwable cause)
使用给定的reason和cause构造一个SQLRecoverableException对象。 SQLState初始化为null ,供应商代码初始化为0。
| Parameters | |
|---|---|
reason |
String: a description of the exception. |
cause |
Throwable: 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. |
SQLRecoverableException (String reason, String SQLState, Throwable cause)
构造一个SQLRecoverableException与给定对象reason , SQLState和cause 。 供应商代码初始化为0。
| Parameters | |
|---|---|
reason |
String: a description of the exception. |
SQLState |
String: an XOPEN or SQL:2003 code identifying the exception |
cause |
Throwable: 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. |
SQLRecoverableException (String reason, String SQLState, int vendorCode, Throwable cause)
构造一个 SQLRecoverableException与给定对象 reason , SQLState , vendorCode和 cause 。
| Parameters | |
|---|---|
reason |
String: a description of the exception |
SQLState |
String: an XOPEN or SQL:2003 code identifying the exception |
vendorCode |
int: a database vendor-specific exception code |
cause |
Throwable: 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. |