public class SQLClientInfoException extends SQLException
SQLException当一个或多个客户端信息属性不能在设置抛出Connection 。
除了SQLException提供的信息SQLException , SQLClientInfoException还提供了未设置的客户端信息属性列表。
某些数据库不允许以原子方式设置多个客户端信息属性。
对于这些数据库,尽管Connection.setClientInfo方法抛出异常,但有可能某些客户端信息属性已设置。
应用程序可以使用getFailedProperties方法来检索未设置的客户端信息属性列表。
通过将Map<String,ClientInfoStatus>传递给Map<String,ClientInfoStatus>的SQLClientInfoException SQLClientInfoException函数来SQLClientInfoException属性。
ClientInfoStatus , Connection.setClientInfo(java.lang.String, java.lang.String) , Serialized Form
| Constructor and Description |
|---|
SQLClientInfoException()
构造一个
SQLClientInfoException对象。
|
SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties)
构造一个
SQLClientInfoException对象,初始化为给定的
failedProperties 。
|
SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties, Throwable cause)
构造一个
SQLClientInfoException对象,初始化为给定的
cause和
failedProperties 。
|
SQLClientInfoException(String reason, Map<String,ClientInfoStatus> failedProperties)
构造一个用给定的
reason和
failedProperties初始化的
SQLClientInfoException对象。
|
SQLClientInfoException(String reason, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
构造一个
SQLClientInfoException与给定的初始化的对象
reason ,
cause和
failedProperties 。
|
SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String,ClientInfoStatus> failedProperties)
构造一个
SQLClientInfoException与给定的初始化的对象
reason ,
SQLState ,
vendorCode和
failedProperties 。
|
SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
构造一个
SQLClientInfoException与给定的初始化的对象
reason ,
SQLState ,
cause ,
vendorCode和
failedProperties 。
|
SQLClientInfoException(String reason, String SQLState, Map<String,ClientInfoStatus> failedProperties)
构造一个
SQLClientInfoException与给定的初始化的对象
reason ,
SQLState和
failedProperties 。
|
SQLClientInfoException(String reason, String SQLState, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
构造一个
SQLClientInfoException与给定的初始化的对象
reason ,
SQLState ,
cause和
failedProperties 。
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,ClientInfoStatus> |
getFailedProperties()
返回无法设置的客户端信息属性列表。
|
getErrorCode, getNextException, getSQLState, iterator, setNextExceptionaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic SQLClientInfoException()
SQLClientInfoException对象。
的reason , SQLState和failedProperties列表被初始化为null ,供应商代码被初始化为0。 cause没有初始化,随后可以通过向一个呼叫进行初始化Throwable.initCause(java.lang.Throwable)方法。
public SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties)
SQLClientInfoException对象,初始化为给定的failedProperties 。
reason和SQLState被初始化为null ,供应商代码被初始化为0. cause未初始化,随后可以通过调用Throwable.initCause(java.lang.Throwable)方法初始化 。
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,并且值包含ClientInfoStatus定义的原因代码ClientInfoStatus
public SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties, Throwable cause)
SQLClientInfoException对象,初始化为给定的cause和failedProperties 。
reason初始化为null如果为cause==null或cause.toString()如果cause!=null ,并将供应商代码初始化为0。
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
cause - (由getCause()方法保存供以后检索);
可能为空,表示原因不存在或未知。
public SQLClientInfoException(String reason, Map<String,ClientInfoStatus> failedProperties)
SQLClientInfoException对象,该对象使用给定的reason和failedProperties 。
SQLState初始化为null ,供应商代码初始化为0. cause未初始化,随后可以通过调用Throwable.initCause(java.lang.Throwable)方法初始化 。
reason - 异常的描述
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,并且值包含ClientInfoStatus定义的原因代码ClientInfoStatus
public SQLClientInfoException(String reason, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
SQLClientInfoException与给定的初始化的对象reason , cause和failedProperties 。
SQLState初始化为null ,供应商代码初始化为0。
reason - 异常的描述
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
cause -底层原因SQLException (保存用于由稍后检索getCause()方法);
可能为空,表示原因不存在或未知。
public SQLClientInfoException(String reason, String SQLState, Map<String,ClientInfoStatus> failedProperties)
SQLClientInfoException与给定的初始化的对象reason , SQLState和failedProperties 。
cause未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化 。
供应商代码初始化为0。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
public SQLClientInfoException(String reason, String SQLState, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
SQLClientInfoException与给定的初始化的对象reason , SQLState , cause和failedProperties 。
供应商代码初始化为0。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
cause -底层原因SQLException (保存用于由稍后检索getCause()方法);
可能为空,表示原因不存在或未知。
public SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String,ClientInfoStatus> failedProperties)
SQLClientInfoException与给定的初始化的对象reason , SQLState , vendorCode和failedProperties 。
cause未初始化,可以随后通过调用Throwable.initCause(java.lang.Throwable)方法进行初始化 。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
vendorCode - 数据库供应商特定的异常代码
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
public SQLClientInfoException(String reason, String SQLState, int vendorCode, Map<String,ClientInfoStatus> failedProperties, Throwable cause)
SQLClientInfoException与给定的初始化的对象
reason ,
SQLState ,
cause ,
vendorCode和
failedProperties 。
reason - 异常的描述
SQLState -
SQLState的XOPEN或SQL:2003代码
vendorCode - 数据库供应商特定的异常代码
failedProperties - 包含无法设置的属性值的地图。
地图中的键包含无法设置的客户端信息属性的名称,值包含ClientInfoStatus定义的原因代码ClientInfoStatus
cause - 这个SQLException (其保存以供稍后通过getCause()方法cause )的根本原因;
可能为空,表示原因不存在或未知。
public Map<String,ClientInfoStatus> getFailedProperties()
ClientInfoStatus定义的原因代码ClientInfoStatus
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, 2014, Oracle and/or its affiliates. All rights reserved.