|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLClientInfoException
public class SQLClientInfoException
当无法在 Connection 上设置一个或多个客户端信息属性时,抛出此 SQLException 的子类。除了 SQLException 提供的信息外,SQLClientInfoException 还提供未设置的客户端信息属性列表。
某些数据库不允许一次设置多个客户端信息属性。对于这些数据库,即使 Connection.setClientInfo 方法抛出异常,可能也已经设置了一些客户端信息属性。应用程序可以使用 getFailedProperties 方法获取未设置的客户端信息属性列表。通过将 Map<String,ClientInfoStatus> 传递给适当的 SQLClientInfoException 构造方法来标识属性。
ClientInfoStatus,
Connection.setClientInfo(java.lang.String, java.lang.String),
序列化表格| 构造方法摘要 | |
|---|---|
SQLClientInfoException()
构造一个 SQLClientInfoException 对象。 |
|
SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties)
构造一个使用给定 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
构造一个使用给定 cause 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
Map<String,ClientInfoStatus> failedProperties)
构造一个使用给定 reason 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
构造一个使用给定 reason、cause 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
String SQLState,
int vendorCode,
Map<String,ClientInfoStatus> failedProperties)
构造一个使用给定 reason、SQLState、vendorCode 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
String SQLState,
int vendorCode,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
构造一个使用给定 reason、SQLState、cause、vendorCode 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
String SQLState,
Map<String,ClientInfoStatus> failedProperties)
构造一个使用给定 reason、SQLState 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
SQLClientInfoException(String reason,
String SQLState,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
构造一个使用给定 reason、SQLState、cause 和 failedProperties 初始化的 SQLClientInfoException 对象。 |
|
| 方法摘要 | |
|---|---|
Map<String,ClientInfoStatus> |
getFailedProperties()
返回无法设置的客户端信息属性列表。 |
| 从类 java.sql.SQLException 继承的方法 |
|---|
getErrorCode, getNextException, getSQLState, iterator, setNextException |
| 从类 java.lang.Throwable 继承的方法 |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public SQLClientInfoException()
SQLClientInfoException 对象。reason、SQLState 和 failedProperties 列表初始化为 null,供应商代码初始化为 0。cause 没有初始化,随后可以通过调用 Throwable.initCause(java.lang.Throwable) 方法来初始化。
public SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties)
failedProperties 初始化的 SQLClientInfoException 对象。reason 和 SQLState 初始化为 null,供应商代码初始化为 0。
cause 没有初始化,随后可以通过调用 Throwable.initCause(java.lang.Throwable) 方法来初始化。
failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码
public SQLClientInfoException(Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
cause 和 failedProperties 初始化的 SQLClientInfoException 对象。
如果 cause==null,则 reason 初始化为 null;如果 cause!=null,则 reason 初始化为 cause.toString(),供应商代码初始化为 0。
failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码cause - 此 SQLClientInfoException 的底层原因(保存此 cause,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
public SQLClientInfoException(String reason,
Map<String,ClientInfoStatus> failedProperties)
reason 和 failedProperties 初始化的 SQLClientInfoException 对象。SQLState 初始化为 null,供应商代码初始化为 0。
cause 没有初始化,随后可以通过调用 Throwable.initCause(java.lang.Throwable) 方法来初始化。
reason - 对异常的描述failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码
public SQLClientInfoException(String reason,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
reason、cause 和 failedProperties 初始化的 SQLClientInfoException 对象。SQLState 初始化为 null,供应商代码初始化为 0。
reason - 对异常的描述failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
public SQLClientInfoException(String reason,
String SQLState,
Map<String,ClientInfoStatus> failedProperties)
reason、SQLState 和 failedProperties 初始化的 SQLClientInfoException 对象。cause 没有初始化,随后可以通过调用 Throwable.initCause(java.lang.Throwable) 方法来初始化。供应商代码初始化为 0。
reason - 对异常的描述SQLState - 标识异常的 XOPEN 或 SQL:2003 代码failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码
public SQLClientInfoException(String reason,
String SQLState,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
reason、SQLState、cause 和 failedProperties 初始化的 SQLClientInfoException 对象。供应商代码初始化为 0。
reason - 对异常的描述SQLState - 标识异常的 XOPEN 或 SQL:2003 代码failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
public SQLClientInfoException(String reason,
String SQLState,
int vendorCode,
Map<String,ClientInfoStatus> failedProperties)
reason、SQLState、vendorCode 和 failedProperties 初始化的 SQLClientInfoException 对象。cause 没有初始化,随后可以通过调用 Throwable.initCause(java.lang.Throwable) 方法来初始化。
reason - 对异常的描述SQLState - 标识异常的 XOPEN 或 SQL:2003 代码vendorCode - 特定于数据库供应商的异常代码failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码
public SQLClientInfoException(String reason,
String SQLState,
int vendorCode,
Map<String,ClientInfoStatus> failedProperties,
Throwable cause)
reason、SQLState、cause、vendorCode 和 failedProperties 初始化的 SQLClientInfoException 对象。
reason - 对异常的描述SQLState - 标识异常的 XOPEN 或 SQL:2003 代码vendorCode - 特定于数据库供应商的异常代码failedProperties - 包含无法设置的属性值的 Map。Map 中的键包含无法设置的客户端信息属性名称,值包含 ClientInfoStatus 中定义的某一原因代码cause - 此 SQLException 的底层原因(保存此原因,以供以后通过 getCause() 方法获取);可以为 null,表示 cause 不存在或未知。
| 方法详细信息 |
|---|
public Map<String,ClientInfoStatus> getFailedProperties()
ClientInfoStatus 中定义的某一原因代码
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。