|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||
java.lang.Objectorg.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingPreparedStatement
基盤となる PreparedStatement の委譲を行う実装です。
PreparedStatement インターフェイスの持つ全てのメソッドは、この
コンストラクタにて渡された
PreparedStatement がアクティブかどうかをチェックして
PreparedStatement の対応するメソッドを単純にコールします。
Statement の追跡とStatement を生成したコードのログを行うために AbandonedTrace を継承します。 Statement の追跡を行うことにより、この Statement を生成した Connection がクローズされる際に、確実にこの Connection がオープンした全ての Statement をクローズすることができるようになります。
| フィールドの概要 | |
protected boolean |
_closed
|
protected DelegatingConnection |
_conn
この Statement を生成したコネクション。 |
protected PreparedStatement |
_stmt
処理の委譲先です。 |
| インタフェース java.sql.Statement から継承したフィールド |
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| コンストラクタの概要 | |
DelegatingPreparedStatement(DelegatingConnection c,
PreparedStatement s)
Statement 、生成したコネクション、生成したコードをトレースする Statement のラッパーを生成します。 |
|
| メソッドの概要 | |
protected void |
activate()
|
void |
addBatch()
|
void |
addBatch(String sql)
|
void |
cancel()
|
protected void |
checkOpen()
|
void |
clearBatch()
|
void |
clearParameters()
|
void |
clearWarnings()
|
void |
close()
この DelegatingPreparedStatement をクローズし、明示的にクローズされていない全ての ResultSet をクローズします。 |
boolean |
execute()
|
boolean |
execute(String sql)
|
int[] |
executeBatch()
|
ResultSet |
executeQuery()
|
ResultSet |
executeQuery(String sql)
|
int |
executeUpdate()
|
int |
executeUpdate(String sql)
|
Connection |
getConnection()
|
PreparedStatement |
getDelegate()
内部に保持する PreparedStatement を返します。
|
int |
getFetchDirection()
|
int |
getFetchSize()
|
PreparedStatement |
getInnermostDelegate()
内部に保持する PreparedStatement が DelegatingPreparedStatement でない場合にはその
PreparedStatement を返し、それ以外の場合には再帰的に getDelegate() をコールします。
|
int |
getMaxFieldSize()
|
int |
getMaxRows()
|
ResultSetMetaData |
getMetaData()
|
boolean |
getMoreResults()
|
int |
getQueryTimeout()
|
ResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
|
int |
getResultSetType()
|
int |
getUpdateCount()
|
SQLWarning |
getWarnings()
|
protected void |
passivate()
|
void |
setArray(int i,
Array x)
|
void |
setAsciiStream(int parameterIndex,
InputStream x,
int length)
|
void |
setBigDecimal(int parameterIndex,
BigDecimal x)
|
void |
setBinaryStream(int parameterIndex,
InputStream x,
int length)
|
void |
setBlob(int i,
Blob x)
|
void |
setBoolean(int parameterIndex,
boolean x)
|
void |
setByte(int parameterIndex,
byte x)
|
void |
setBytes(int parameterIndex,
byte[] x)
|
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length)
|
void |
setClob(int i,
Clob x)
|
void |
setCursorName(String name)
|
void |
setDate(int parameterIndex,
Date x)
|
void |
setDate(int parameterIndex,
Date x,
Calendar cal)
|
void |
setDelegate(PreparedStatement s)
処理の委託先となる PreparedStatement を設定します。 |
void |
setDouble(int parameterIndex,
double x)
|
void |
setEscapeProcessing(boolean enable)
|
void |
setFetchDirection(int direction)
|
void |
setFetchSize(int rows)
|
void |
setFloat(int parameterIndex,
float x)
|
void |
setInt(int parameterIndex,
int x)
|
void |
setLong(int parameterIndex,
long x)
|
void |
setMaxFieldSize(int max)
|
void |
setMaxRows(int max)
|
void |
setNull(int parameterIndex,
int sqlType)
|
void |
setNull(int paramIndex,
int sqlType,
String typeName)
|
void |
setObject(int parameterIndex,
Object x)
|
void |
setObject(int parameterIndex,
Object x,
int targetSqlType)
|
void |
setObject(int parameterIndex,
Object x,
int targetSqlType,
int scale)
|
void |
setQueryTimeout(int seconds)
|
void |
setRef(int i,
Ref x)
|
void |
setShort(int parameterIndex,
short x)
|
void |
setString(int parameterIndex,
String x)
|
void |
setTime(int parameterIndex,
Time x)
|
void |
setTime(int parameterIndex,
Time x,
Calendar cal)
|
void |
setTimestamp(int parameterIndex,
Timestamp x)
|
void |
setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
|
| クラス 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 から継承したメソッド |
getParameterMetaData, setUnicodeStream, setURL |
| インタフェース java.sql.Statement から継承したメソッド |
execute, execute, execute, executeUpdate, executeUpdate, executeUpdate, getGeneratedKeys, getMoreResults, getResultSetHoldability |
| フィールドの詳細 |
protected boolean _closed
protected DelegatingConnection _conn
protected PreparedStatement _stmt
| コンストラクタの詳細 |
public DelegatingPreparedStatement(DelegatingConnection c,
PreparedStatement s)
s - the 全ての処理の委託先となる PreparedStatement
c - このステートメントを生成した DelegatingConnection
| メソッドの詳細 |
protected void activate()
public void addBatch()
throws SQLException
PreparedStatement 内の addBatchSQLException
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 clearParameters()
throws SQLException
PreparedStatement 内の clearParametersSQLException
public void clearWarnings()
throws SQLException
Statement 内の clearWarningsSQLException
public void close()
throws SQLException
Statement 内の closeSQLException
public boolean execute()
throws SQLException
PreparedStatement 内の executeSQLException
public boolean execute(String sql)
throws SQLException
Statement 内の executeSQLException
public int[] executeBatch()
throws SQLException
Statement 内の executeBatchSQLException
public ResultSet executeQuery()
throws SQLException
PreparedStatement 内の executeQuerySQLException
public ResultSet executeQuery(String sql)
throws SQLException
Statement 内の executeQuerySQLException
public int executeUpdate()
throws SQLException
PreparedStatement 内の executeUpdateSQLException
public int executeUpdate(String sql)
throws SQLException
Statement 内の executeUpdateSQLException
public Connection getConnection()
throws SQLException
Statement 内の getConnectionSQLExceptionpublic PreparedStatement getDelegate()
PreparedStatement を返します。
PreparedStatement
public int getFetchDirection()
throws SQLException
Statement 内の getFetchDirectionSQLException
public int getFetchSize()
throws SQLException
Statement 内の getFetchSizeSQLExceptionpublic PreparedStatement getInnermostDelegate()
PreparedStatement が DelegatingPreparedStatement でない場合にはその
PreparedStatement を返し、それ以外の場合には再帰的に getDelegate() をコールします。
従ってこのメソッドは DelegatingPreparedStatement ではない根本の処理の委託先となる PreparedStatement を返し、 DelegatingPreparedStatement の連鎖の中に処理の委託先が見つからない場合には null を返します。
このメソッドはネストした DelegatingPreparedStatement から
本来の PreparedStatement を取得したい場合に有用です。
public int getMaxFieldSize()
throws SQLException
Statement 内の getMaxFieldSizeSQLException
public int getMaxRows()
throws SQLException
Statement 内の getMaxRowsSQLException
public ResultSetMetaData getMetaData()
throws SQLException
PreparedStatement 内の getMetaDataSQLException
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 setArray(int i,
Array x)
throws SQLException
PreparedStatement 内の setArraySQLException
public void setAsciiStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
PreparedStatement 内の setAsciiStreamSQLException
public void setBigDecimal(int parameterIndex,
BigDecimal x)
throws SQLException
PreparedStatement 内の setBigDecimalSQLException
public void setBinaryStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
PreparedStatement 内の setBinaryStreamSQLException
public void setBlob(int i,
Blob x)
throws SQLException
PreparedStatement 内の setBlobSQLException
public void setBoolean(int parameterIndex,
boolean x)
throws SQLException
PreparedStatement 内の setBooleanSQLException
public void setByte(int parameterIndex,
byte x)
throws SQLException
PreparedStatement 内の setByteSQLException
public void setBytes(int parameterIndex,
byte[] x)
throws SQLException
PreparedStatement 内の setBytesSQLException
public void setCharacterStream(int parameterIndex,
Reader reader,
int length)
throws SQLException
PreparedStatement 内の setCharacterStreamSQLException
public void setClob(int i,
Clob x)
throws SQLException
PreparedStatement 内の setClobSQLException
public void setCursorName(String name)
throws SQLException
Statement 内の setCursorNameSQLException
public void setDate(int parameterIndex,
Date x)
throws SQLException
PreparedStatement 内の setDateSQLException
public void setDate(int parameterIndex,
Date x,
Calendar cal)
throws SQLException
PreparedStatement 内の setDateSQLExceptionpublic void setDelegate(PreparedStatement s)
PreparedStatement を設定します。
public void setDouble(int parameterIndex,
double x)
throws SQLException
PreparedStatement 内の setDoubleSQLException
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 setFloat(int parameterIndex,
float x)
throws SQLException
PreparedStatement 内の setFloatSQLException
public void setInt(int parameterIndex,
int x)
throws SQLException
PreparedStatement 内の setIntSQLException
public void setLong(int parameterIndex,
long x)
throws SQLException
PreparedStatement 内の setLongSQLException
public void setMaxFieldSize(int max)
throws SQLException
Statement 内の setMaxFieldSizeSQLException
public void setMaxRows(int max)
throws SQLException
Statement 内の setMaxRowsSQLException
public void setNull(int parameterIndex,
int sqlType)
throws SQLException
PreparedStatement 内の setNullSQLException
public void setNull(int paramIndex,
int sqlType,
String typeName)
throws SQLException
PreparedStatement 内の setNullSQLException
public void setObject(int parameterIndex,
Object x)
throws SQLException
PreparedStatement 内の setObjectSQLException
public void setObject(int parameterIndex,
Object x,
int targetSqlType)
throws SQLException
PreparedStatement 内の setObjectSQLException
public void setObject(int parameterIndex,
Object x,
int targetSqlType,
int scale)
throws SQLException
PreparedStatement 内の setObjectSQLException
public void setQueryTimeout(int seconds)
throws SQLException
Statement 内の setQueryTimeoutSQLException
public void setRef(int i,
Ref x)
throws SQLException
PreparedStatement 内の setRefSQLException
public void setShort(int parameterIndex,
short x)
throws SQLException
PreparedStatement 内の setShortSQLException
public void setString(int parameterIndex,
String x)
throws SQLException
PreparedStatement 内の setStringSQLException
public void setTime(int parameterIndex,
Time x)
throws SQLException
PreparedStatement 内の setTimeSQLException
public void setTime(int parameterIndex,
Time x,
Calendar cal)
throws SQLException
PreparedStatement 内の setTimeSQLException
public void setTimestamp(int parameterIndex,
Timestamp x)
throws SQLException
PreparedStatement 内の setTimestampSQLException
public void setTimestamp(int parameterIndex,
Timestamp x,
Calendar cal)
throws SQLException
PreparedStatement 内の setTimestampSQLException
|
|||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||