Most visited

Recently visited

Added in API level 9

SQLTransactionRollbackException

public class SQLTransactionRollbackException
extends SQLTransientException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.sql.SQLException
         ↳ java.sql.SQLTransientException
           ↳ java.sql.SQLTransactionRollbackException


当SQLState类的值为' 40 '时,或在供应商指定的条件下引发的子类SQLException 。 这表明当前语句由于死锁或其他事务序列化失败而被数据库自动回滚。

请参考您的驱动程序供应商文档, 异常可能引发此 异常的供应商指定的条件。

Summary

Public constructors

SQLTransactionRollbackException()

构造一个 SQLTransactionRollbackException对象。

SQLTransactionRollbackException(String reason)

用给定的 reason构造一个 SQLTransactionRollbackException对象。

SQLTransactionRollbackException(String reason, String SQLState)

用给定的 reason和 SQLState构造一个 SQLTransactionRollbackException对象。

SQLTransactionRollbackException(String reason, String SQLState, int vendorCode)

构造一个 SQLTransactionRollbackException与给定对象 reason , SQLState和 vendorCode 。

SQLTransactionRollbackException(Throwable cause)

用给定的 cause构造一个 SQLTransactionRollbackException对象。

SQLTransactionRollbackException(String reason, Throwable cause)

用给定的 reason和 cause构造一个 SQLTransactionRollbackException对象。

SQLTransactionRollbackException(String reason, String SQLState, Throwable cause)

构造一个 SQLTransactionRollbackException与给定对象 reason , SQLState和 cause 。

SQLTransactionRollbackException(String reason, String SQLState, int vendorCode, Throwable cause)

构造一个 SQLTransactionRollbackException与给定对象 reason , SQLState , vendorCode和 cause 。

Inherited methods

From class java.sql.SQLException
From class java.lang.Throwable
From class java.lang.Object
From interface java.lang.Iterable

Public constructors

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException ()

构造一个SQLTransactionRollbackException对象。 的reason , SQLState被初始化为null和供应商代码被初始化为0。 cause没有初始化,随后可以通过向一个呼叫进行初始化initCause(java.lang.Throwable)方法。

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason)

用给定的reason构造一个SQLTransactionRollbackException对象。 SQLState初始化为null ,并将供应商代码初始化为cause未初始化,并可能随后通过调用initCause(java.lang.Throwable)方法进行初始化。

Parameters
reason String: a description of the exception

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason, 
                String SQLState)

使用给定的reason和SQLState构造一个SQLTransactionRollbackException对象。 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

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason, 
                String SQLState, 
                int vendorCode)

构造一个SQLTransactionRollbackException与给定对象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

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (Throwable cause)

使用给定的cause构造一个SQLTransactionRollbackException对象。 SQLState初始化为null ,供应商代码初始化为0. reason初始化为null如果为cause==null或cause.toString()如果为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.

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason, 
                Throwable cause)

用给定的reason和cause构造一个SQLTransactionRollbackException对象。 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.

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason, 
                String SQLState, 
                Throwable cause)

构造一个SQLTransactionRollbackException与给定对象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.

SQLTransactionRollbackException

Added in API level 9
SQLTransactionRollbackException (String reason, 
                String SQLState, 
                int vendorCode, 
                Throwable cause)

构造一个 SQLTransactionRollbackException与给定对象 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.

Hooray!