public class RowSetWarning extends SQLException
SQLException警告设置
RowSet对象信息的延伸。警告是默默地链接到该对象的方法调用导致它被报告。这类补充
SQLWarning类。
行集警告可能会从JdbcRowSet,CachedRowSet™,WebRowSet,FilteredRowSet检索,或JoinRowSet实现。要检索的第一个警告称任何RowSet实现,使用的方法getRowSetWarnings在JdbcRowSet接口或CachedRowSet接口定义。检索一个警告在第一次警告,使用RowSetWarning方法getNextWarning。检索随后的警告,呼吁每个RowSetWarning对象getNextWarning,返回。
继承的方法getMessage,getSQLState,和getErrorCode检索包含在RowSetWarning对象信息。
| Constructor and Description |
|---|
RowSetWarning()
构建了一个默认的
RowSetWarning对象。
|
RowSetWarning(String reason)
构建一个与给定值的原因
RowSetWarning对象;SQLSTATE默认为null,而vendorcode默认为0。
|
RowSetWarning(String reason, String SQLState)
构建了一个
RowSetWarning对象与给定值和SQLSTATE原因初始化。
|
RowSetWarning(String reason, String SQLState, int vendorCode)
构建完整的
RowSetWarning对象初始化与给定值的原因,并vendorcode SQLSTATE。
|
| Modifier and Type | Method and Description |
|---|---|
RowSetWarning |
getNextWarning()
在这
RowSetWarning检索预警对象。
|
void |
setNextWarning(RowSetWarning warning)
集警告作为下一个警告,就是警告在这
RowSetWarning对象。
|
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 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对象与给定值和SQLSTATE原因初始化。供应商代码默认为0。如果
reason或
SQLState参数
null,这个构造函数的行为像默认构造函数(无参数)
RowSetWarning。
reason -
String描述的警告;
SQLState - XOPEN代码标识的警告;如果提供的非标准信息段XOPEN,不引发异常。
public RowSetWarning getNextWarning()
RowSetWarning检索预警对象。
RowSetWarning对象链接到这一个;如果没有
RowSetWarning对象链接到这一个,
null返回(默认值)
setNextWarning(javax.sql.rowset.RowSetWarning)
public void setNextWarning(RowSetWarning warning)
RowSetWarning对象。
warning -
RowSetWarning对象被设置为下一个警告;如果
RowSetWarning是空的,这是在警示链的终点
getNextWarning()
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.