public class SQLClientInfoException
extends SQLException
| java.lang.Object | ||||
| ↳ | java.lang.Throwable | |||
| ↳ | java.lang.Exception | |||
| ↳ | java.sql.SQLException | |||
| ↳ | java.sql.SQLClientInfoException | |||
的子类SQLException当一个或多个客户端信息属性不能在设置抛出Connection 。 除了SQLClientInfoException提供的信息SQLException , SQLClientInfoException还提供了未设置的客户端信息属性列表。 某些数据库不允许以原子方式设置多个客户端信息属性。 对于这些数据库,即使Connection.setClientInfo方法引发异常,也可能会设置一些客户端信息属性。 应用程序可以使用getFailedProperties方法来检索未设置的客户端信息属性列表。 属性通过将Map<String,ClientInfoStatus>传递给适当的SQLClientInfoException构造函数来标识。
Public constructors |
|
|---|---|
SQLClientInfoException() 构造一个 |
|
SQLClientInfoException(Map<String, ClientInfoStatus> failedProperties) 构造一个用给定的 |
|
SQLClientInfoException(Map<String, ClientInfoStatus> failedProperties, Throwable cause) 构造一个用给定的 |
|
SQLClientInfoException(String reason, Map<String, ClientInfoStatus> failedProperties) 构造一个使用给定的 |
|
SQLClientInfoException(String reason, Map<String, ClientInfoStatus> failedProperties, Throwable cause) 构造一个 |
|
SQLClientInfoException(String reason, String SQLState, Map<String, ClientInfoStatus> failedProperties) 构造一个 |
|
SQLClientInfoException(String reason, String SQLState, Map<String, ClientInfoStatus> failedProperties, Throwable cause) 构造一个 |
|
SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String, ClientInfoStatus> failedProperties) 构造一个 |
|
SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String, ClientInfoStatus> failedProperties, Throwable cause) 构造一个 |
|
Public methods |
|
|---|---|
Map<String, ClientInfoStatus> |
getFailedProperties() 返回无法设置的客户端信息属性列表。 |
Inherited methods |
|
|---|---|
java.sql.SQLException
|
|
java.lang.Throwable
|
|
java.lang.Object
|
|
java.lang.Iterable
|
|
SQLClientInfoException ()
构造一个SQLClientInfoException对象。 的reason , SQLState ,和failedProperties列表被初始化为null和供应商代码被初始化为0。 cause没有初始化,随后可以通过向一个呼叫进行初始化initCause(java.lang.Throwable)方法。
SQLClientInfoException (Map<String, ClientInfoStatus> failedProperties)
构造一个用给定的failedProperties初始化的SQLClientInfoException对象。 reason和SQLState被初始化为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 (Map<String, ClientInfoStatus> failedProperties, Throwable cause)
构造一个使用给定的cause和failedProperties初始化的SQLClientInfoException对象。 reason初始化为null如果为cause==null或cause.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 (String reason, Map<String, ClientInfoStatus> failedProperties)
构造一个用给定的reason和failedProperties初始化的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 (String reason, Map<String, ClientInfoStatus> failedProperties, Throwable cause)
构造一个SQLClientInfoException与给定的初始化的对象reason , cause和failedProperties 。 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 (String reason, String SQLState, Map<String, ClientInfoStatus> 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 (String reason, String SQLState, Map<String, ClientInfoStatus> failedProperties, Throwable cause)
构造一个SQLClientInfoException与给定的初始化的对象reason , SQLState , cause和failedProperties 。 供应商代码初始化为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 (String reason, String SQLState, int vendorCode, Map<String, ClientInfoStatus> failedProperties)
构造一个SQLClientInfoException与给定的初始化的对象reason , SQLState , vendorCode和failedProperties 。 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 (String reason, String SQLState, int vendorCode, Map<String, ClientInfoStatus> failedProperties, Throwable cause)
构造一个 SQLClientInfoException与给定的初始化的对象 reason , SQLState , cause , vendorCode和 failedProperties 。
| 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. |
Map<String, ClientInfoStatus> 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<String, ClientInfoStatus> |
Map list containing the client info properties that could not be set |