创新互联鸿蒙OS教程:鸿蒙OSStatementEvent
StatementEvent

专注于为中小企业提供网站设计制作、成都网站建设服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业黄埔免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上千余家企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。
java.lang.Object
|---java.util.EventObject
|---|---javax.sql.StatementEvent
public class StatementEvent
extends EventObjectStatementEvent 被发送到所有向 PooledConnection 注册的 StatementEventListener。 当驱动程序确定与 PooledConnection 关联的 PreparedStatement 已关闭或驱动程序确定无效时,会发生这种情况。
Since:
1.6
字段摘要
| 从类 java.util.EventObject 继承的字段 | 
|---|
| source | 
构造函数摘要
| 构造函数 | 描述 | 
|---|---|
| StatementEvent(PooledConnection con, PreparedStatement statement) | 使用指定的 PooledConnection 和 PreparedStatement 构造一个 StatementEvent。 | 
| StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception) | 使用指定的 PooledConnection、PreparedStatement 和 SQLException 构造一个 StatementEvent | 
方法总结
| 修饰符和类型 | 方法 | 描述 | 
|---|---|---|
| SQLException | getSQLException() | 返回驱动程序即将抛出的 SQLException | 
| PreparedStatement | getStatement() | 返回正在关闭或无效的 PreparedStatement | 
| 从类 java.util.EventObject 继承的方法 | 
|---|
| getSource, toString | 
| 从类 java.lang.Object 继承的方法 | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
构造函数详细信息
StatementEvent
public StatementEvent(PooledConnection con, PreparedStatement statement)
使用指定的 PooledConnection 和 PreparedStatement 构造一个 StatementEvent。 事件中包含的 SQLException 默认为 null。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| con | 与关闭或无效 PreparedStatement 关联的 PooledConnection。 | 
| statement | 正在关闭或无效的 PreparedStatement | 
Throws:
| Throw名称 | Throw描述 | 
|---|---|
| IllegalArgumentException | 如果 con 为空。 | 
Since:
1.6
StatementEvent
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
使用指定的 PooledConnection、PreparedStatement 和 SQLException 构造一个 StatementEvent
参数:
| 参数名称 | 参数描述 | 
|---|---|
| con | 与关闭或无效 PreparedStatement 关联的 PooledConnection。 | 
| statement | 正在关闭或无效的 PreparedStatement | 
| exception | 驱动程序即将向应用程序抛出的 SQLException | 
Throws:
| Throw名称 | Throw描述 | 
|---|---|
| IllegalArgumentException | 如果 con 为空。 | 
Since:
1.6
方法详情
getStatement
public PreparedStatement getStatement()
返回正在关闭或无效的 PreparedStatement
返回:
正在关闭或无效的 PreparedStatement
Since:
1.6
getSQLException
public SQLException getSQLException()
返回驱动程序即将抛出的 SQLException
返回:
驱动程序即将抛出的 SQLException
Since:
1.6
网页名称:创新互联鸿蒙OS教程:鸿蒙OSStatementEvent
标题路径:http://jxruijie.cn/article/djhihso.html

 
                