|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.sql.SQLException
javax.sql.rowset.RowSetWarning
public class RowSetWarning
SQLException 的一个扩展,提供关于在 RowSet 对象上设置的数据库警告的信息。这些警告正常链接到其方法调用会导致报告警告的那些对象。此类对 SQLWarning 类进行补充。
Rowset 警告可以从 JdbcRowSet、CachedRowSetTM、WebRowSet、FilteredRowSet 或 JoinRowSet 实现中获取到。要获取在任何 RowSet 实现上报告的第一个警告,需要使用在 JdbcRowSet 接口或 CachedRowSet 接口中定义的 getRowSetWarnings 方法。要获取链接到第一个警告的警告,需要使用 RowSetWarning 方法 getNextWarning。要获取后续警告,需要对每个返回的 RowSetWarning 对象调用 getNextWarning。
继承方法 getMessage、getSQLState 和 getErrorCode 用于获取 RowSetWarning 对象中包含的信息。
| 构造方法摘要 | |
|---|---|
RowSetWarning()
构造一个默认的 RowSetWarning 对象。 |
|
RowSetWarning(String reason)
用给定的 reason 值构造 RowSetWarning 对象;SQLState 默认为 null,vendorCode 默认为 0。 |
|
RowSetWarning(String reason,
String SQLState)
构造一个 RowSetWarning 对象,并使用给定的 reason 和 SQLState 值进行初始化。 |
|
RowSetWarning(String reason,
String SQLState,
int vendorCode)
构造一个完全指定的 RowSetWarning 对象,并使用给定的 reason、SQLState 和 vendorCode 值进行初始化。 |
|
| 方法摘要 | |
|---|---|
RowSetWarning |
getNextWarning()
获取链接到此 SQLWarning 对象的警告。 |
void |
setNextWarning(RowSetWarning warning)
将 warning 设置为下一个警告,即连接到此 RowSetWarning 对象的警告。 |
| 从类 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 RowSetWarning(String reason)
RowSetWarning 对象;SQLState 默认为 null,vendorCode 默认为 0。
reason - 给出警告描述的 String 对象;如果 String 为 null,则此构造方法的行为类似于默认的(零参数)RowSetWarning 构造方法public RowSetWarning()
RowSetWarning 对象。原因默认为 null,SQLState 默认为 null,vendorCode 默认为 0。
public RowSetWarning(String reason,
String SQLState)
RowSetWarning 对象,并使用给定的 reason 和 SQLState 值进行初始化。供应商代码默认为 0。
如果 reason 或 SQLState 参数为 null,则此构造方法的行为类似于默认的(零参数)RowSetWarning 构造方法。
reason - 给出警告描述的 String;SQLState - 标识警告的 XOPEN 代码;如果未提供标准的 XOPEN SQLState,则不抛出任何异常。
public RowSetWarning(String reason,
String SQLState,
int vendorCode)
RowSetWarning 对象,并使用给定的 reason、SQLState 和 vendorCode 值进行初始化。
如果 reason 或 SQLState 参数为 null,则此构造方法的行为类似于默认的(零参数)RowSetWarning 构造方法。
reason - 给出警告描述的 String;SQLState - 标识警告的 XOPEN 代码;如果未提供标准的 XPOEN SQLState,则不抛出任何异常。vendorCode - 特定于数据库供应商的警告代码| 方法详细信息 |
|---|
public RowSetWarning getNextWarning()
SQLWarning 对象的警告。
RowSetWarning 对象;如果不存在链接到此警告的 RowSetWarning 对象,则返回 null(默认值)setNextWarning(javax.sql.rowset.RowSetWarning)public void setNextWarning(RowSetWarning warning)
RowSetWarning 对象的警告。
warning - 要设置为下一个警告的 RowSetWarning 对象;如果 RowSetWarning 为 null,则此值表示警告链接中的结束点getNextWarning()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。