W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
java.lang.Object
|---java.util.EventObject
|---|---javax.sql.StatementEvent
public class StatementEvent
extends EventObject
StatementEvent 被發(fā)送到所有向 PooledConnection 注冊的 StatementEventListener。 當(dāng)驅(qū)動(dòng)程序確定與 PooledConnection 關(guān)聯(lián)的 PreparedStatement 已關(guān)閉或驅(qū)動(dòng)程序確定無效時(shí),會(huì)發(fā)生這種情況。
Since:
1.6
從類 java.util.EventObject 繼承的字段 |
---|
source |
構(gòu)造函數(shù) | 描述 |
---|---|
StatementEvent(PooledConnection con, PreparedStatement statement) | 使用指定的 PooledConnection 和 PreparedStatement 構(gòu)造一個(gè) StatementEvent。 |
StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception) | 使用指定的 PooledConnection、PreparedStatement 和 SQLException 構(gòu)造一個(gè) StatementEvent |
修飾符和類型 | 方法 | 描述 |
---|---|---|
SQLException | getSQLException() | 返回驅(qū)動(dòng)程序即將拋出的 SQLException |
PreparedStatement | getStatement() | 返回正在關(guān)閉或無效的 PreparedStatement |
從類 java.util.EventObject 繼承的方法 |
---|
getSource, toString |
從類 java.lang.Object 繼承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
public StatementEvent(PooledConnection con, PreparedStatement statement)
使用指定的 PooledConnection 和 PreparedStatement 構(gòu)造一個(gè) StatementEvent。 事件中包含的 SQLException 默認(rèn)為 null。
參數(shù):
參數(shù)名稱 | 參數(shù)描述 |
---|---|
con | 與關(guān)閉或無效 PreparedStatement 關(guān)聯(lián)的 PooledConnection。 |
statement | 正在關(guān)閉或無效的 PreparedStatement |
Throws:
Throw名稱 | Throw描述 |
---|---|
IllegalArgumentException | 如果 con 為空。 |
Since:
1.6
public StatementEvent(PooledConnection con, PreparedStatement statement, SQLException exception)
使用指定的 PooledConnection、PreparedStatement 和 SQLException 構(gòu)造一個(gè) StatementEvent
參數(shù):
參數(shù)名稱 | 參數(shù)描述 |
---|---|
con | 與關(guān)閉或無效 PreparedStatement 關(guān)聯(lián)的 PooledConnection。 |
statement | 正在關(guān)閉或無效的 PreparedStatement |
exception | 驅(qū)動(dòng)程序即將向應(yīng)用程序拋出的 SQLException |
Throws:
Throw名稱 | Throw描述 |
---|---|
IllegalArgumentException | 如果 con 為空。 |
Since:
1.6
public PreparedStatement getStatement()
返回正在關(guān)閉或無效的 PreparedStatement
返回:
正在關(guān)閉或無效的 PreparedStatement
Since:
1.6
public SQLException getSQLException()
返回驅(qū)動(dòng)程序即將拋出的 SQLException
返回:
驅(qū)動(dòng)程序即將拋出的 SQLException
Since:
1.6
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: