org.apache.commons.dbcp
クラス PoolablePreparedStatement

java.lang.Object
  拡張org.apache.commons.dbcp.AbandonedTrace
      拡張org.apache.commons.dbcp.DelegatingPreparedStatement
          拡張org.apache.commons.dbcp.PoolablePreparedStatement
すべての実装インタフェース:
PreparedStatement, Statement

public class PoolablePreparedStatement
extends DelegatingPreparedStatement
implements PreparedStatement

PreparedStatement のプールを実現するために PoolingConnection と協力して動作する DelegatingPreparedStatement です。

close() メソッドは自分の所属するプールにこのステートメントを戻します。(PoolingConnection を参照)

バージョン:
$Id: PoolablePreparedStatement.java,v 1.1.1.1 2004/02/13 10:02:03 hioki Exp $
作成者:
Rodney Waldhoff, Glenn L. Nielsen, James House (james@interobjective.com)
関連項目:
PoolingConnection
翻訳者:
日置 聡

フィールドの概要
protected  Connection _conn
          このステートメントを生成した Connection です。
protected  Object _key
          KeyedObjectPool で使用されるこのステートメントのキーです。
protected  org.apache.commons.pool.KeyedObjectPool _pool
          このステートメントを取り出す元となる KeyedObjectPool です。
 
クラス org.apache.commons.dbcp.DelegatingPreparedStatement から継承したフィールド
_closed, _stmt
 
インタフェース java.sql.Statement から継承したフィールド
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
コンストラクタの概要
PoolablePreparedStatement(PreparedStatement stmt, Object key, org.apache.commons.pool.KeyedObjectPool pool, Connection conn)
          コンストラクタ。
 
メソッドの概要
 void close()
          このステートメントをプールに返します。
 Connection getConnection()
          このステートメントを生成した Connection を返します。
 
クラス org.apache.commons.dbcp.DelegatingPreparedStatement から継承したメソッド
activate, addBatch, addBatch, cancel, checkOpen, clearBatch, clearParameters, clearWarnings, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, getDelegate, getFetchDirection, getFetchSize, getInnermostDelegate, getMaxFieldSize, getMaxRows, getMetaData, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, passivate, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setCursorName, setDate, setDate, setDelegate, setDouble, setEscapeProcessing, setFetchDirection, setFetchSize, setFloat, setInt, setLong, setMaxFieldSize, setMaxRows, setNull, setNull, setObject, setObject, setObject, setQueryTimeout, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp
 
クラス 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.PreparedStatement から継承したメソッド
addBatch, clearParameters, execute, executeQuery, executeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
 
インタフェース java.sql.Statement から継承したメソッド
addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

フィールドの詳細

_conn

protected Connection _conn
このステートメントを生成した Connection です。


_key

protected Object _key
KeyedObjectPool で使用されるこのステートメントのキーです。


_pool

protected org.apache.commons.pool.KeyedObjectPool _pool
このステートメントを取り出す元となる KeyedObjectPool です。 The KeyedObjectPool from which I was obtained.

コンストラクタの詳細

PoolablePreparedStatement

public PoolablePreparedStatement(PreparedStatement stmt,
                                 Object key,
                                 org.apache.commons.pool.KeyedObjectPool pool,
                                 Connection conn)
コンストラクタ。

パラメータ:
stmt - 内部に保持する PreparedStatement
key - KeyedObjectPool で使用されるこのステートメントのキー
pool - このステートメントを取り出す元となる KeyedObjectPool
conn - このステートメントを生成した Connection
メソッドの詳細

close

public void close()
           throws SQLException
このステートメントをプールに返します。

定義:
インタフェース Statement 内の close
オーバーライド:
クラス DelegatingPreparedStatement 内の close
例外:
SQLException

getConnection

public Connection getConnection()
                         throws SQLException
このステートメントを生成した Connection を返します。 Return the Connection from which I was created.

定義:
インタフェース Statement 内の getConnection
オーバーライド:
クラス DelegatingPreparedStatement 内の getConnection
例外:
SQLException


このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation