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, setNextException
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
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
对象与给定值和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.