模块 java.sql
 javax.sql

类 StatementEvent

java.lang.Object
java.util.EventObject
javax.sql.StatementEvent
所有已实现的接口:
Serializable

public class StatementEvent extends EventObject
一个 StatementEvent 被发送到所有在 PooledConnection 注册的 StatementEventListener 。当驱动程序确定与 PooledConnection 关联的 PreparedStatement 已关闭或驱动程序确定无效时,会发生这种情况。
自从:
1.6
参见:
  • 构造方法详细信息

    • StatementEvent

      public StatementEvent(PooledConnection  con, PreparedStatement  statement)
      使用指定的 PooledConnectionPreparedStatement 构造一个 StatementEvent。事件中包含的 SQLException 默认为 null。
      参数:
      con - 与已关闭或无效的 PreparedStatement 关联的 PooledConnection
      statement - 正在关闭或无效的 PreparedStatement
      抛出:
      IllegalArgumentException - 如果 con 为空。
      自从:
      1.6
    • StatementEvent

      public StatementEvent(PooledConnection  con, PreparedStatement  statement, SQL异常  exception)
      用指定的 PooledConnectionPreparedStatementSQLException 构造一个 StatementEvent
      参数:
      con - 与已关闭或无效的 PreparedStatement 关联的 PooledConnection
      statement - 正在关闭或无效的 PreparedStatement
      exception - 驱动程序即将向应用程序抛出的 SQLException
      抛出:
      IllegalArgumentException - 如果 con 为空。
      自从:
      1.6
  • 方法详情

    • getStatement

      public PreparedStatement  getStatement()
      返回正在关闭或无效的PreparedStatement
      返回:
      正在关闭或无效的PreparedStatement
      自从:
      1.6
    • getSQLException

      public SQL异常  getSQLException()
      返回驱动程序即将抛出的 SQLException
      返回:
      SQLException司机正要扔
      自从:
      1.6