|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Objectorg.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingStatement
基盤となる Statement の委譲を行う実装です。
Statement インターフェイスの持つ全てのメソッドは、この
コンストラクタにて渡された
Statement がアクティブかどうかをチェックして
Statement の対応するメソッドを単純にコールします。
Statement の追跡とStatement を生成したコードのログを行うために AbandonedTrace を継承します。 Statement の追跡を行うことにより、この Statement を生成した Connection がクローズされる際に、確実にこの Connection がオープンした全ての Statement をクローズすることができるようになります。
| フィールドの概要 | |
protected boolean |
_closed
|
protected DelegatingConnection |
_conn
この Statement を生成したコネクション。 |
protected Statement |
_stmt
処理の委譲先です。 |
| インタフェース java.sql.Statement から継承したフィールド |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| コンストラクタの概要 | |
DelegatingStatement(DelegatingConnection c,
Statement s)
Statement 、生成したコネクション、生成したコードをトレースする Statement のラッパーを生成します。 |
|
| クラス org.apache.commons.dbcp.AbandonedTrace から継承したメソッド |
addTrace, clearTrace, getConfig, getLastUsed, getTrace, printStackTrace, removeTrace, setLastUsed, setLastUsed, setStackTrace |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース java.sql.Statement から継承したメソッド |
execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getGeneratedKeys, getMoreResults, getResultSetHoldability |
| フィールドの詳細 |
protected boolean _closed
protected DelegatingConnection _conn
protected Statement _stmt
| コンストラクタの詳細 |
public DelegatingStatement(DelegatingConnection c,
Statement s)
s - the 全ての処理の委託先となる Statement
c - このステートメントを生成した DelegatingConnection
| メソッドの詳細 |
protected void activate()
public void addBatch(String sql)
throws SQLException
Statement 内の addBatchSQLException
public void cancel()
throws SQLException
Statement 内の cancelSQLException
protected void checkOpen()
throws SQLException
SQLException
public void clearBatch()
throws SQLException
Statement 内の clearBatchSQLException
public void clearWarnings()
throws SQLException
Statement 内の clearWarningsSQLException
public void close()
throws SQLException
Statement 内の closeSQLException
public boolean execute(String sql)
throws SQLException
Statement 内の executeSQLException
public int[] executeBatch()
throws SQLException
Statement 内の executeBatchSQLException
public ResultSet executeQuery(String sql)
throws SQLException
Statement 内の executeQuerySQLException
public int executeUpdate(String sql)
throws SQLException
Statement 内の executeUpdateSQLException
public Connection getConnection()
throws SQLException
Statement 内の getConnectionSQLExceptionpublic Statement getDelegate()
Statement を返します。
Statement
public int getFetchDirection()
throws SQLException
Statement 内の getFetchDirectionSQLException
public int getFetchSize()
throws SQLException
Statement 内の getFetchSizeSQLExceptionpublic Statement getInnermostDelegate()
Statement が DelegatingStatement でない場合にはその
Statement を返し、それ以外の場合には再帰的に getDelegate() をコールします。
従ってこのメソッドは DelegatingStatement ではない根本の処理の委託先となる Statement を返し、 DelegatingStatement の連鎖の中に処理の委託先が見つからない場合には null を返します。
このメソッドはネストした DelegatingStatement から
本来の Statement を取得したい場合に有用です。
public int getMaxFieldSize()
throws SQLException
Statement 内の getMaxFieldSizeSQLException
public int getMaxRows()
throws SQLException
Statement 内の getMaxRowsSQLException
public boolean getMoreResults()
throws SQLException
Statement 内の getMoreResultsSQLException
public int getQueryTimeout()
throws SQLException
Statement 内の getQueryTimeoutSQLException
public ResultSet getResultSet()
throws SQLException
Statement 内の getResultSetSQLException
public int getResultSetConcurrency()
throws SQLException
Statement 内の getResultSetConcurrencySQLException
public int getResultSetType()
throws SQLException
Statement 内の getResultSetTypeSQLException
public int getUpdateCount()
throws SQLException
Statement 内の getUpdateCountSQLException
public SQLWarning getWarnings()
throws SQLException
Statement 内の getWarningsSQLException
protected void passivate()
throws SQLException
SQLException
public void setCursorName(String name)
throws SQLException
Statement 内の setCursorNameSQLExceptionpublic void setDelegate(Statement s)
Statement を設定します。
public void setEscapeProcessing(boolean enable)
throws SQLException
Statement 内の setEscapeProcessingSQLException
public void setFetchDirection(int direction)
throws SQLException
Statement 内の setFetchDirectionSQLException
public void setFetchSize(int rows)
throws SQLException
Statement 内の setFetchSizeSQLException
public void setMaxFieldSize(int max)
throws SQLException
Statement 内の setMaxFieldSizeSQLException
public void setMaxRows(int max)
throws SQLException
Statement 内の setMaxRowsSQLException
public void setQueryTimeout(int seconds)
throws SQLException
Statement 内の setQueryTimeoutSQLException
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||