JavaTM 2 Platform
Standard Ed. 6

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
另请参见:
序列化表格

字段摘要
 
从类 java.util.EventObject 继承的字段
source
 
构造方法摘要
StatementEvent(PooledConnection con, PreparedStatement statement)
          用指定的 PooledConnectionPreparedStatement 构造 StatementEvent
StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
          用指定的 PooledConnectionPreparedStatementSQLException 构造 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)
用指定的 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
方法详细信息

getStatement

public PreparedStatement getStatement()
返回正在关闭或无效的 PreparedStatement

返回:
正在关闭的或无效的 PreparedStatement

从以下版本开始:
1.6

getSQLException

public SQLException getSQLException()
返回驱动程序将要抛出的 SQLException

返回:
驱动程序将要抛出的 SQLException

从以下版本开始:
1.6

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only