public class StatementEvent extends EventObject
PooledConnection
に登録されたすべてのStatementEventListener
に、StatementEvent
が送信されます。 この処理は、ドライバが、PooledConnection
に関連付けられたPreparedStatement
が閉じたか、無効であると判断した場合に行われます。
source
コンストラクタ | 説明 |
---|---|
StatementEvent(PooledConnection con, PreparedStatement statement) |
指定された
PooledConnection とPreparedStatement を持つStatementEvent を構築します。 |
StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception) |
指定された
PooledConnection 、PreparedStatement 、およびSQLException を持つStatementEvent を構築します。 |
修飾子と型 | メソッド | 説明 |
---|---|---|
SQLException |
getSQLException() |
ドライバがスローしようとしている
SQLException を返します。 |
PreparedStatement |
getStatement() |
閉じられた、または無効な
PreparedStatement を返します。 |
getSource, toString
public StatementEvent(PooledConnection con, PreparedStatement statement)
PooledConnection
とPreparedStatement
を持つStatementEvent
を構築します。 このイベントに含まれるSQLException
は、デフォルトでnullになります。
con
- 閉じられた、または無効なPreparedStatement
が関連付けられているPooledConnection
。statement
- 閉じられた、または無効なPreparedStatement
IllegalArgumentException
- con
がnullである場合。public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
PooledConnection
、PreparedStatement
、およびSQLException
を持つStatementEvent
を構築します。
con
- 閉じられた、または無効なPreparedStatement
が関連付けられているPooledConnection
。statement
- 閉じられた、または無効なPreparedStatement
exception
- ドライバがアプリケーションにスローしようとしているSQLException
IllegalArgumentException
- con
がnullである場合。
public PreparedStatement getStatement()
PreparedStatement
を返します。
PreparedStatement
public SQLException getSQLException()
SQLException
を返します。
SQLException
バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。 そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Documentation Redistribution Policyも参照してください。