org.apache.commons.dbcp
クラス DelegatingCallableStatement
java.lang.Object
org.apache.commons.dbcp.AbandonedTrace
org.apache.commons.dbcp.DelegatingCallableStatement
- すべての実装インタフェース:
- CallableStatement, PreparedStatement, Statement
- public class DelegatingCallableStatement
- extends AbandonedTrace
- implements CallableStatement
基盤となる CallableStatement の委譲を行う実装です。
CallableStatement インターフェイスの持つ全てのメソッドは、コンストラクタにて渡された
CallableStatement の対応するメソッドを単純にコールします。
Statement の追跡とStatement を生成したコードのログを行うために AbandonedTrace を継承します。
Statement の追跡を行うことにより、この Statement を生成した Connection がクローズされる際に、確実にこの
Connection がオープンした全ての Statement をクローズすることができるようになります。
- 作成者:
- Glenn L. Nielsen, James House (james@interobjective.com)
- 翻訳者:
- 日置 聡
|
メソッドの概要 |
void |
addBatch()
|
void |
addBatch(String sql)
|
void |
cancel()
|
void |
clearBatch()
|
void |
clearParameters()
|
void |
clearWarnings()
|
void |
close()
この DelegatingCallableStatement をクローズし、明示的にクローズされていない全ての ResultSet をクローズします。
|
boolean |
execute()
|
boolean |
execute(String sql)
|
int[] |
executeBatch()
|
ResultSet |
executeQuery()
|
ResultSet |
executeQuery(String sql)
|
int |
executeUpdate()
|
int |
executeUpdate(String sql)
|
Array |
getArray(int i)
|
BigDecimal |
getBigDecimal(int parameterIndex)
|
Blob |
getBlob(int i)
|
boolean |
getBoolean(int parameterIndex)
|
byte |
getByte(int parameterIndex)
|
byte[] |
getBytes(int parameterIndex)
|
Clob |
getClob(int i)
|
Connection |
getConnection()
|
Date |
getDate(int parameterIndex)
|
Date |
getDate(int parameterIndex,
Calendar cal)
|
double |
getDouble(int parameterIndex)
|
int |
getFetchDirection()
|
int |
getFetchSize()
|
float |
getFloat(int parameterIndex)
|
int |
getInt(int parameterIndex)
|
long |
getLong(int parameterIndex)
|
int |
getMaxFieldSize()
|
int |
getMaxRows()
|
ResultSetMetaData |
getMetaData()
|
boolean |
getMoreResults()
|
Object |
getObject(int parameterIndex)
|
Object |
getObject(int i,
Map map)
|
int |
getQueryTimeout()
|
Ref |
getRef(int i)
|
ResultSet |
getResultSet()
|
int |
getResultSetConcurrency()
|
int |
getResultSetType()
|
short |
getShort(int parameterIndex)
|
String |
getString(int parameterIndex)
|
Time |
getTime(int parameterIndex)
|
Time |
getTime(int parameterIndex,
Calendar cal)
|
Timestamp |
getTimestamp(int parameterIndex)
|
Timestamp |
getTimestamp(int parameterIndex,
Calendar cal)
|
int |
getUpdateCount()
|
SQLWarning |
getWarnings()
|
void |
registerOutParameter(int parameterIndex,
int sqlType)
|
void |
registerOutParameter(int parameterIndex,
int sqlType,
int scale)
|
void |
registerOutParameter(int paramIndex,
int sqlType,
String typeName)
|
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 |
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)
|
boolean |
wasNull()
|
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース java.sql.CallableStatement から継承したメソッド |
getArray, getBigDecimal, getBigDecimal, getBlob, getBoolean, getByte, getBytes, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getObject, getObject, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getURL, getURL, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setBigDecimal, setBinaryStream, setBoolean, setByte, setBytes, setCharacterStream, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL |
_conn
protected DelegatingConnection _conn
- この Statement を生成したコネクション。
_stmt
protected CallableStatement _stmt
- 処理の委譲先です。
DelegatingCallableStatement
public DelegatingCallableStatement(DelegatingConnection c,
CallableStatement s)
- Statement 、生成したコネクション、生成したコードをトレースする
Statement のラッパーを生成します。
- パラメータ:
s - 全ての処理の委託先となる CallableStatement
addBatch
public void addBatch()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の addBatch
- 例外:
SQLException
addBatch
public void addBatch(String sql)
throws SQLException
- 定義:
- インタフェース
Statement 内の addBatch
- 例外:
SQLException
cancel
public void cancel()
throws SQLException
- 定義:
- インタフェース
Statement 内の cancel
- 例外:
SQLException
clearBatch
public void clearBatch()
throws SQLException
- 定義:
- インタフェース
Statement 内の clearBatch
- 例外:
SQLException
clearParameters
public void clearParameters()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の clearParameters
- 例外:
SQLException
clearWarnings
public void clearWarnings()
throws SQLException
- 定義:
- インタフェース
Statement 内の clearWarnings
- 例外:
SQLException
close
public void close()
throws SQLException
- この DelegatingCallableStatement をクローズし、明示的にクローズされていない全ての ResultSet をクローズします。
- 定義:
- インタフェース
Statement 内の close
- 例外:
SQLException
execute
public boolean execute()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の execute
- 例外:
SQLException
execute
public boolean execute(String sql)
throws SQLException
- 定義:
- インタフェース
Statement 内の execute
- 例外:
SQLException
executeBatch
public int[] executeBatch()
throws SQLException
- 定義:
- インタフェース
Statement 内の executeBatch
- 例外:
SQLException
executeQuery
public ResultSet executeQuery()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の executeQuery
- 例外:
SQLException
executeQuery
public ResultSet executeQuery(String sql)
throws SQLException
- 定義:
- インタフェース
Statement 内の executeQuery
- 例外:
SQLException
executeUpdate
public int executeUpdate()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の executeUpdate
- 例外:
SQLException
executeUpdate
public int executeUpdate(String sql)
throws SQLException
- 定義:
- インタフェース
Statement 内の executeUpdate
- 例外:
SQLException
getArray
public Array getArray(int i)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getArray
- 例外:
SQLException
getBigDecimal
public BigDecimal getBigDecimal(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getBigDecimal
- 例外:
SQLException
getBlob
public Blob getBlob(int i)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getBlob
- 例外:
SQLException
getBoolean
public boolean getBoolean(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getBoolean
- 例外:
SQLException
getByte
public byte getByte(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getByte
- 例外:
SQLException
getBytes
public byte[] getBytes(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getBytes
- 例外:
SQLException
getClob
public Clob getClob(int i)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getClob
- 例外:
SQLException
getConnection
public Connection getConnection()
throws SQLException
- 定義:
- インタフェース
Statement 内の getConnection
- 例外:
SQLException
getDate
public Date getDate(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getDate
- 例外:
SQLException
getDate
public Date getDate(int parameterIndex,
Calendar cal)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getDate
- 例外:
SQLException
getDouble
public double getDouble(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getDouble
- 例外:
SQLException
getFetchDirection
public int getFetchDirection()
throws SQLException
- 定義:
- インタフェース
Statement 内の getFetchDirection
- 例外:
SQLException
getFetchSize
public int getFetchSize()
throws SQLException
- 定義:
- インタフェース
Statement 内の getFetchSize
- 例外:
SQLException
getFloat
public float getFloat(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getFloat
- 例外:
SQLException
getInt
public int getInt(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getInt
- 例外:
SQLException
getLong
public long getLong(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getLong
- 例外:
SQLException
getMaxFieldSize
public int getMaxFieldSize()
throws SQLException
- 定義:
- インタフェース
Statement 内の getMaxFieldSize
- 例外:
SQLException
getMaxRows
public int getMaxRows()
throws SQLException
- 定義:
- インタフェース
Statement 内の getMaxRows
- 例外:
SQLException
getMetaData
public ResultSetMetaData getMetaData()
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の getMetaData
- 例外:
SQLException
getMoreResults
public boolean getMoreResults()
throws SQLException
- 定義:
- インタフェース
Statement 内の getMoreResults
- 例外:
SQLException
getObject
public Object getObject(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getObject
- 例外:
SQLException
getObject
public Object getObject(int i,
Map map)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getObject
- 例外:
SQLException
getQueryTimeout
public int getQueryTimeout()
throws SQLException
- 定義:
- インタフェース
Statement 内の getQueryTimeout
- 例外:
SQLException
getRef
public Ref getRef(int i)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getRef
- 例外:
SQLException
getResultSet
public ResultSet getResultSet()
throws SQLException
- 定義:
- インタフェース
Statement 内の getResultSet
- 例外:
SQLException
getResultSetConcurrency
public int getResultSetConcurrency()
throws SQLException
- 定義:
- インタフェース
Statement 内の getResultSetConcurrency
- 例外:
SQLException
getResultSetType
public int getResultSetType()
throws SQLException
- 定義:
- インタフェース
Statement 内の getResultSetType
- 例外:
SQLException
getShort
public short getShort(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getShort
- 例外:
SQLException
getString
public String getString(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getString
- 例外:
SQLException
getTime
public Time getTime(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getTime
- 例外:
SQLException
getTime
public Time getTime(int parameterIndex,
Calendar cal)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getTime
- 例外:
SQLException
getTimestamp
public Timestamp getTimestamp(int parameterIndex)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getTimestamp
- 例外:
SQLException
getTimestamp
public Timestamp getTimestamp(int parameterIndex,
Calendar cal)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の getTimestamp
- 例外:
SQLException
getUpdateCount
public int getUpdateCount()
throws SQLException
- 定義:
- インタフェース
Statement 内の getUpdateCount
- 例外:
SQLException
getWarnings
public SQLWarning getWarnings()
throws SQLException
- 定義:
- インタフェース
Statement 内の getWarnings
- 例外:
SQLException
registerOutParameter
public void registerOutParameter(int parameterIndex,
int sqlType)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の registerOutParameter
- 例外:
SQLException
registerOutParameter
public void registerOutParameter(int parameterIndex,
int sqlType,
int scale)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の registerOutParameter
- 例外:
SQLException
registerOutParameter
public void registerOutParameter(int paramIndex,
int sqlType,
String typeName)
throws SQLException
- 定義:
- インタフェース
CallableStatement 内の registerOutParameter
- 例外:
SQLException
setArray
public void setArray(int i,
Array x)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setArray
- 例外:
SQLException
setAsciiStream
public void setAsciiStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setAsciiStream
- 例外:
SQLException
setBigDecimal
public void setBigDecimal(int parameterIndex,
BigDecimal x)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setBigDecimal
- 例外:
SQLException
setBinaryStream
public void setBinaryStream(int parameterIndex,
InputStream x,
int length)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setBinaryStream
- 例外:
SQLException
setBlob
public void setBlob(int i,
Blob x)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setBlob
- 例外:
SQLException
setBoolean
public void setBoolean(int parameterIndex,
boolean x)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の setBoolean
- 例外:
SQLException
setByte
public void setByte(int parameterIndex,
byte x)
throws SQLException
- 定義:
- インタフェース
PreparedStatement 内の