Most visited

Recently visited

Added in API level 9

SQLClientInfoException

public class SQLClientInfoException
extends SQLException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.sql.SQLException
         ↳ java.sql.SQLClientInfoException


的子类SQLException当一个或多个客户端信息属性不能在设置抛出Connection 除了SQLClientInfoException提供的信息SQLExceptionSQLClientInfoException还提供了未设置的客户端信息属性列表。 某些数据库不允许以原子方式设置多个客户端信息属性。 对于这些数据库,即使Connection.setClientInfo方法引发异常,也可能会设置一些客户端信息属性。 应用程序可以使用getFailedProperties方法来检索未设置的客户端信息属性列表。 属性通过将Map<String,ClientInfoStatus>传递给适当的SQLClientInfoException构造函数来标识。

也可以看看:

Summary

Public constructors

SQLClientInfoException()

构造一个 SQLClientInfoException对象。

SQLClientInfoException(Map<StringClientInfoStatus> failedProperties)

构造一个用给定的 failedProperties初始化的 SQLClientInfoException对象。

SQLClientInfoException(Map<StringClientInfoStatus> failedProperties, Throwable cause)

构造一个用给定的 causefailedProperties初始化的 SQLClientInfoException对象。

SQLClientInfoException(String reason, Map<StringClientInfoStatus> failedProperties)

构造一个使用给定的 reasonfailedProperties初始化的 SQLClientInfoException对象。

SQLClientInfoException(String reason, Map<StringClientInfoStatus> failedProperties, Throwable cause)

构造一个 SQLClientInfoException与给定的初始化的对象 reasoncausefailedProperties

SQLClientInfoException(String reason, String SQLState, Map<StringClientInfoStatus> failedProperties)

构造一个 SQLClientInfoException与给定的初始化的对象 reasonSQLStatefailedProperties

SQLClientInfoException(String reason, String SQLState, Map<StringClientInfoStatus> failedProperties, Throwable cause)

构造一个 SQLClientInfoException与给定的初始化的对象 reasonSQLStatecausefailedProperties

SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<StringClientInfoStatus> failedProperties)

构造一个 SQLClientInfoException与给定的初始化的对象 reasonSQLStatevendorCodefailedProperties

SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<StringClientInfoStatus> failedProperties, Throwable cause)

构造一个 SQLClientInfoException与给定的初始化的对象 reasonSQLStatecausevendorCodefailedProperties

Public methods

Map<StringClientInfoStatus> getFailedProperties()

返回无法设置的客户端信息属性列表。

Inherited methods

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

Public constructors

SQLClientInfoException

Added in API level 9
SQLClientInfoException ()

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

SQLClientInfoException

Added in API level 9
SQLClientInfoException (Map<StringClientInfoStatus> failedProperties)

构造一个用给定的failedProperties初始化的SQLClientInfoException对象。 reasonSQLState被初始化为null ,并且供应商代码被初始化为cause未被初始化,并且随后可以通过调用initCause(java.lang.Throwable)方法来初始化。

Parameters
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus

SQLClientInfoException

Added in API level 9
SQLClientInfoException (Map<StringClientInfoStatus> failedProperties, 
                Throwable cause)

构造一个使用给定的causefailedProperties初始化的SQLClientInfoException对象。 reason初始化为null如果为cause==nullcause.toString()如果cause!=null且供应商代码初始化为0)。

Parameters
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus
cause Throwable: the (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown.

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                Map<StringClientInfoStatus> failedProperties)

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

Parameters
reason String: a description of the exception
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                Map<StringClientInfoStatus> failedProperties, 
                Throwable cause)

构造一个SQLClientInfoException与给定的初始化的对象reasoncausefailedProperties SQLState初始化为null ,供应商代码初始化为0。

Parameters
reason String: a description of the exception
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus
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.

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                String SQLState, 
                Map<StringClientInfoStatus> failedProperties)

Constructs a SQLClientInfoException object initialized with a given reason, SQLState and failedProperties. The cause is not initialized, and may subsequently be initialized by a call to the initCause(java.lang.Throwable) method. The vendor code is initialized to 0.

Parameters
reason String: a description of the exception
SQLState String: an XOPEN or SQL:2003 code identifying the exception
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                String SQLState, 
                Map<StringClientInfoStatus> failedProperties, 
                Throwable cause)

构造一个SQLClientInfoException与给定的初始化的对象reasonSQLStatecausefailedProperties 供应商代码初始化为0。

Parameters
reason String: a description of the exception
SQLState String: an XOPEN or SQL:2003 code identifying the exception
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus
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.

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                String SQLState, 
                int vendorCode, 
                Map<StringClientInfoStatus> failedProperties)

构造一个SQLClientInfoException与给定的初始化的对象reasonSQLStatevendorCodefailedProperties 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
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus

SQLClientInfoException

Added in API level 9
SQLClientInfoException (String reason, 
                String SQLState, 
                int vendorCode, 
                Map<StringClientInfoStatus> failedProperties, 
                Throwable cause)

构造一个 SQLClientInfoException与给定的初始化的对象 reasonSQLStatecausevendorCodefailedProperties

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
failedProperties Map: A Map containing the property values that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus
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.

Public methods

getFailedProperties

Added in API level 9
Map<StringClientInfoStatus> getFailedProperties ()

Returns the list of client info properties that could not be set. The keys in the Map contain the names of the client info properties that could not be set and the values contain one of the reason codes defined in ClientInfoStatus

Returns
Map<StringClientInfoStatus> Map list containing the client info properties that could not be set

Hooray!