Module java.sql
Package javax.sql

Class StatementEvent

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

public class StatementEvent extends EventObject
StatementEvent被发送到所有已向PooledConnection注册的StatementEventListener。当驱动程序确定与PooledConnection关联的PreparedStatement已关闭或驱动程序确定无效时,会发生这种情况。
自:
1.6
参见:
  • Constructor Details

    • StatementEvent

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

      public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
      使用指定的PooledConnectionPreparedStatementSQLException构造一个StatementEvent
      参数:
      con - 与关闭或无效的PreparedStatement关联的PooledConnection
      statement - 正在关闭或无效的PreparedStatement
      exception - 驱动程序即将向应用程序抛出的SQLException
      抛出:
      IllegalArgumentException - 如果con为null。
      自:
      1.6
  • Method Details

    • getStatement

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

      public SQLException getSQLException()
      返回驱动程序即将抛出的SQLException
      返回:
      驱动程序即将抛出的SQLException
      自:
      1.6