public class StatementEvent extends EventObject
StatementEvent发送到所有StatementEventListener s,其已注册PooledConnection 。
当驱动程序确定与PreparedStatement关联的PooledConnection已关闭或驱动程序确定无效时,会发生这种情况。
source| Constructor and Description |
|---|
StatementEvent(PooledConnection con, PreparedStatement statement)
构造一个
StatementEvent与指定的
PooledConnection和
PreparedStatement 。
|
StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
构造一个
StatementEvent用指定的
PooledConnection ,
PreparedStatement和
SQLException
|
| Modifier and Type | Method and Description |
|---|---|
SQLException |
getSQLException()
返回驱动程序即将抛出的
SQLException
|
PreparedStatement |
getStatement()
返回正在关闭或无效的
PreparedStatement
|
getSource, toStringpublic StatementEvent(PooledConnection con, PreparedStatement statement)
StatementEvent与指定的PooledConnection和PreparedStatement 。
事件中SQLException SQLException默认为null。
con -该
PooledConnection ,该封闭的或无效
PreparedStatement相关联。
statement - 正在关闭或无效的
PreparedStatement
IllegalArgumentException - 如果
con为空。
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
StatementEvent用指定的
PooledConnection ,
PreparedStatement和
SQLException
con -该
PooledConnection ,该封闭的或无效
PreparedStatement相关联。
statement - 正在关闭或无效的
PreparedStatement
exception -该
SQLException司机即将抛出的应用
IllegalArgumentException - 如果
con为空。
public PreparedStatement getStatement()
PreparedStatement
PreparedStatement
public SQLException getSQLException()
SQLException
SQLException的司机即将抛出
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.