Package nablarch.core.db.statement
Interface SqlPStatement
- All Superinterfaces:
SqlStatement
- All Known Subinterfaces:
SqlCStatement
- All Known Implementing Classes:
BasicSqlCStatement,BasicSqlPStatement,CacheableSqlPStatement
バインド変数をもつSQL文を実行するインタフェース。
- Author:
- Hisaaki Sioiri
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()voidbooleanexecute()intintbooleanbooleangetMoreResults(int current) Statement.getResultSet()のラッパー。intintintretrieve()簡易検索機能。 下記設定で検索を実行する。 読み込み開始位置 = 1 最大行数 = 無制限 本メソッドを使用するとSqlStatement.setMaxRows(int)で事前に設定した値は無視する。retrieve(int start, int max) 簡易検索機能。voidvoidsetAsciiStream(int parameterIndex, InputStream x, int length) voidsetBigDecimal(int parameterIndex, BigDecimal x) voidsetBinaryStream(int parameterIndex, InputStream x, int length) voidvoidsetBoolean(int parameterIndex, boolean x) voidsetByte(int parameterIndex, byte x) voidsetBytes(int parameterIndex, byte[] x) voidsetCharacterStream(int parameterIndex, Reader reader, int length) voidvoidvoidvoidsetDouble(int parameterIndex, double x) voidsetFetchDirection(int direction) voidsetFloat(int parameterIndex, float x) voidsetInt(int parameterIndex, int x) voidsetLong(int parameterIndex, long x) voidsetNull(int parameterIndex, int sqlType) voidvoidvoidvoidvoidsetShort(int parameterIndex, short x) voidvoidvoidvoidsetTimestamp(int parameterIndex, Timestamp x) voidsetTimestamp(int parameterIndex, Timestamp x, Calendar cal) voidMethods inherited from interface nablarch.core.db.statement.SqlStatement
clearBatch, close, executeBatch, getBatchSize, getConnection, getFetchSize, getMaxRows, getQueryTimeout, getUpdateCount, isClosed, setFetchSize, setJdbcTransactionTimeoutHandler, setMaxRows, setQueryTimeout
-
Method Details
-
retrieve
簡易検索機能。 下記設定で検索を実行する。- 読み込み開始位置 = 1
- 最大行数 = 無制限
SqlStatement.setMaxRows(int)で事前に設定した値は無視する。- Returns:
- 取得結果
- Throws:
SqlStatementException- SQL実行時にSQLExceptionが発生した場合。
-
retrieve
簡易検索機能。- Parameters:
start- 取得開始位置max- 取得最大件数- Returns:
- 取得結果
- Throws:
SqlStatementException- SQL実行時にSQLExceptionが発生した場合。
-
executeQuery
- Returns:
- 取得結果
- Throws:
SqlStatementException- SQL実行時にSQLExceptionが発生した場合。
-
executeUpdate
- Returns:
- 更新件数
- Throws:
SqlStatementException- SQL実行時にSQLExceptionが発生した場合。
-
setNull
void setNull(int parameterIndex, int sqlType) - Parameters:
parameterIndex- パラメータインデックスsqlType- SQLタイプ(Types)
-
setBoolean
void setBoolean(int parameterIndex, boolean x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setByte
void setByte(int parameterIndex, byte x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setShort
void setShort(int parameterIndex, short x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setInt
void setInt(int parameterIndex, int x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setLong
void setLong(int parameterIndex, long x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setFloat
void setFloat(int parameterIndex, float x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setDouble
void setDouble(int parameterIndex, double x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setBigDecimal
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setString
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setBytes
void setBytes(int parameterIndex, byte[] x) - Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setDate
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setTime
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setTimestamp
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setAsciiStream
- Parameters:
parameterIndex- パラメータインデックスx- パラメータlength- ストリームのバイト数
-
setBinaryStream
- Parameters:
parameterIndex- パラメータインデックスx- パラメータlength- ストリームのバイト数
-
clearParameters
void clearParameters() -
setObject
- Parameters:
parameterIndex- パラメータインデックスx- パラメータtargetSqlType- SQLタイプ(java.sql.Types)
-
setObject
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
execute
- Returns:
- 最初の結果が
ResultSetオブジェクトの場合はtrue。 更新カウントであるか、または結果がない場合はfalse。 - Throws:
SqlStatementException- 例外発生時
-
addBatch
void addBatch() -
setCharacterStream
- Parameters:
parameterIndex- パラメータインデックスreader- パラメータlength- ストリームないの文字数
-
setRef
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setBlob
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setClob
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
setArray
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
getMetaData
ResultSetMetaData getMetaData()- Returns:
- ResultSetMetaData
-
setDate
- Parameters:
parameterIndex- パラメータインデックスx- パラメータcal- ドライバが日付を作成するために使用するCalendarオブジェクト
-
setTime
- Parameters:
parameterIndex- パラメータインデックスx- パラメータcal- ドライバが日付を作成するために使用するCalendarオブジェクト
-
setTimestamp
- Parameters:
parameterIndex- パラメータインデックスx- パラメータcal- ドライバが日付を作成するために使用するCalendarオブジェクト
-
setNull
- Parameters:
parameterIndex- パラメータインデックスsqlType- SQLタイプtypeName- SQL ユーザー定義型の完全指定の名前。 パラメータがユーザー定義型でもRefでもない場合は無視される。
-
setURL
- Parameters:
parameterIndex- パラメータインデックスx- パラメータ
-
getResultSet
ResultSet getResultSet()Statement.getResultSet()のラッパー。- Returns:
ResultSetオブジェクトとしての現在の結果。 更新カウントであるか、結果がない場合はnull。
-
getMoreResults
boolean getMoreResults()- Returns:
- 次の結果が
ResultSetオブジェクトの場合はtrue。 更新カウントであるか、結果がない場合はfalse。
-
setFetchDirection
void setFetchDirection(int direction) - Parameters:
direction- 行を処理する初期方向
-
getFetchDirection
int getFetchDirection()- Returns:
- この Statement オブジェクトから生成された結果セットのデフォルトのフェッチ方向
-
getResultSetConcurrency
int getResultSetConcurrency()- Returns:
ResultSet.CONCUR_READ_ONLYまたはResultSet.CONCUR_UPDATABLE。
-
getResultSetType
int getResultSetType() -
getMoreResults
boolean getMoreResults(int current) - Parameters:
current- getResultSet メソッドを使用して取得した、 現在のResultSetオブジェクトに生じる状態を示す Statement 定数。Statement.CLOSE_CURRENT_RESULT、Statement.KEEP_CURRENT_RESULT、Statement.CLOSE_ALL_RESULTSのうちの 1 つ。- Returns:
- 次の結果が
ResultSetオブジェクトの場合はtrue。 更新カウントであるか、または結果がない場合はfalse。
-
getGeneratedKeys
ResultSet getGeneratedKeys()- Returns:
- この Statement オブジェクトの実行で生成された自動生成キーを含む
ResultSetオブジェクト
-
getResultSetHoldability
int getResultSetHoldability()
-