Most visited

Recently visited

Added in API level 9

StatementEvent

public class StatementEvent
extends EventObject

java.lang.Object
    java.util.EventObject
      javax.sql.StatementEvent


一个StatementEvent被发送到所有StatementEventListener ,这些都是通过PooledConnection注册的。 当驾驶员判断为发生这种PreparedStatement与所述相关联的PooledConnection已被关闭或驱动程序确定是无效的。

摘要(Summary)

Inherited fields

From class java.util.EventObject

Public constructors

StatementEvent(PooledConnection con, PreparedStatement statement)

构造一个 StatementEvent具有指定 PooledConnection和 PreparedStatement 。

StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)

构造一个 StatementEvent具有指定 PooledConnection , PreparedStatement和 SQLException

公共方法(Public methods)

SQLException getSQLException()

返回驱动程序即将抛出的 SQLException

PreparedStatement getStatement()

返回正在关闭或无效的 PreparedStatement

继承方法(Inherited methods)

From class java.util.EventObject
From class java.lang.Object

Public constructors

StatementEvent

Added in API level 9
StatementEvent (PooledConnection con, 
                PreparedStatement statement)

构造一个StatementEvent具有指定PooledConnection和PreparedStatement 。 包含在事件中的SQLException默认为null。

参数(Parameters)
con PooledConnection: The PooledConnection that the closed or invalid PreparedStatementis associated with.
statement PreparedStatement: The PreparedStatement that is bieng closed or is invalid

抛出异常(Throws)
IllegalArgumentException if con is null.

StatementEvent

Added in API level 9
StatementEvent (PooledConnection con, 
                PreparedStatement statement, 
                SQLException exception)

构造一个 StatementEvent具有指定 PooledConnection , PreparedStatement和 SQLException

参数(Parameters)
con PooledConnection: The PooledConnection that the closed or invalid PreparedStatement is associated with.
statement PreparedStatement: The PreparedStatement that is being closed or is invalid
exception SQLException: The SQLException the driver is about to throw to the application
抛出异常(Throws)
IllegalArgumentException if con is null.

公共方法(Public methods)

getSQLException

Added in API level 9
SQLException getSQLException ()

返回驾驶员即将抛出的 SQLException

返回(Returns)
SQLException The SQLException the driver is about to throw

getStatement

Added in API level 9
PreparedStatement getStatement ()

返回正在关闭或无效的 PreparedStatement

返回(Returns)
PreparedStatement The PreparedStatement that is being closed or is invalid

Hooray!