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具有指定 PooledConnectionPreparedStatement

StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)

构造一个 StatementEvent具有指定 PooledConnectionPreparedStatementSQLException

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具有指定PooledConnectionPreparedStatement 包含在事件中的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具有指定 PooledConnectionPreparedStatementSQLException

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!