- java.lang.Object
-
- java.util.EventObject
-
- javax.sql.StatementEvent
-
- All Implemented Interfaces:
-
Serializable
public class StatementEvent extends EventObject
AStatementEvent发送到所有StatementEventListeners,其中注册了一个PooledConnection。 当驾驶员判断为发生这种PreparedStatement与所述相关联的PooledConnection已被关闭或驱动程序确定是无效的。- 从以下版本开始:
- 1.6
- 另请参见:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
构造方法摘要
构造方法 Constructor 描述 StatementEvent(PooledConnection con, PreparedStatement statement)构造一个StatementEvent与指定的PooledConnection和PreparedStatement。StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)构造一个StatementEvent具有指定PooledConnection,PreparedStatement和SQLException
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 SQLExceptiongetSQLException()返回驱动程序即将抛出的SQLExceptionPreparedStatementgetStatement()返回正在关闭或无效的PreparedStatement-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
构造方法详细信息
-
StatementEvent
public StatementEvent(PooledConnection con, PreparedStatement statement)
构造一个StatementEvent与指定的PooledConnection和PreparedStatement。 事件中包含的SQLException默认为null。- 参数
-
con-该PooledConnection,该封闭的或无效PreparedStatement相关联。 -
statement- 正在关闭或无效的PreparedStatement - 异常
-
IllegalArgumentException- 如果con为空。 - 从以下版本开始:
- 1.6
-
StatementEvent
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
构造一个StatementEvent,其中指定的PooledConnectionPreparedStatement和SQLException- 参数
-
con-该PooledConnection,该封闭的或无效PreparedStatement相关联。 -
statement- 正在关闭或无效的PreparedStatement -
exception-SQLException驱动程序即将抛出的应用程序 - 异常
-
IllegalArgumentException- 如果con为空。 - 从以下版本开始:
- 1.6
-
-
方法详细信息
-
getStatement
public PreparedStatement getStatement()
返回正在关闭或无效的PreparedStatement- 结果
-
正在关闭或无效的
PreparedStatement - 从以下版本开始:
- 1.6
-
getSQLException
public SQLException getSQLException()
返回驱动程序即将抛出的SQLException- 结果
-
SQLException的司机即将抛出 - 从以下版本开始:
- 1.6
-
-