|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.extension.jdbc.query.AbstractQuery<S>
org.seasar.extension.jdbc.query.AbstractAutoBatchUpdate<T,S>
T - エンティティの型です。S - BatchUpdateのサブタイプです。public abstract class AbstractAutoBatchUpdate<T,S extends BatchUpdate<S>>
バッチ更新の抽象クラスです。
| フィールドの概要 | |
|---|---|
protected int |
batchSize
バッチサイズ |
protected java.util.List<T> |
entities
エンティティのリスト |
protected EntityMeta |
entityMeta
エンティティメタデータ |
protected boolean |
suppresOptimisticLockException
バージョンチェックを行った場合に、 更新行数が0行でも OptimisticLockExceptionをスローしないなら
true |
| クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド |
|---|
callerClass, callerMethodName, completed, executedSql, jdbcManager, logger, paramList, queryTimeout |
| コンストラクタの概要 | |
|---|---|
AbstractAutoBatchUpdate(JdbcManagerImplementor jdbcManager,
java.util.List<T> entities)
|
|
| メソッドの概要 | |
|---|---|
S |
batchSize(int batchSize)
バッチ更新のサイズを設定します。 |
protected java.sql.PreparedStatement |
createPreparedStatement(JdbcContext jdbcContext)
準備されたステートメントを作成します。 |
int[] |
execute()
バッチ更新します。 |
protected int[] |
executeBatch(java.sql.PreparedStatement ps)
バッチ更新を実行します。 |
protected int[] |
executeInternal()
データベースのバッチ更新を実行します。 |
java.util.List<T> |
getEntities()
エンティティのリストを返します。 |
protected java.sql.PreparedStatement |
getPreparedStatement(JdbcContext jdbcContext)
準備されたステートメントを返します。 |
protected void |
incrementVersions()
バージョンの値を増加させます。 |
protected abstract boolean |
isOptimisticLock()
楽観的同時実行制御を行っている場合は trueを返します。 |
protected abstract void |
prepareParams(T entity)
バインド変数を準備します. |
protected void |
prepareSql()
SQLを準備します。 |
protected abstract java.lang.String |
toSql()
SQLに変換します。 |
protected void |
validateRows(java.sql.PreparedStatement ps,
int[] rows)
行を更新または削除できたかどうかチェックします。 |
| クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたメソッド |
|---|
addParam, addParam, addParam, addParam, assertNotCompleted, callerClass, callerMethodName, completed, getCallerClass, getCallerMethodName, getExecutedSql, getJdbcManager, getParam, getParamClasses, getParamSize, getParamValues, getParamValueTypes, getQueryTimeout, getValueType, handleResultSet, logSql, logSql, prepare, prepareCallerClassAndMethodName, prepareInParams, queryTimeout, resetParams, toStringArray |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース org.seasar.extension.jdbc.Query から継承されたメソッド |
|---|
callerClass, callerMethodName, queryTimeout |
| フィールドの詳細 |
|---|
protected final java.util.List<T> entities
protected final EntityMeta entityMeta
protected int batchSize
protected boolean suppresOptimisticLockException
OptimisticLockExceptionをスローしないなら
true
| コンストラクタの詳細 |
|---|
public AbstractAutoBatchUpdate(JdbcManagerImplementor jdbcManager,
java.util.List<T> entities)
jdbcManager - 内部的なJDBCマネージャentities - エンティティのリスト
EmptyRuntimeException - エンティティのリストが空の場合| メソッドの詳細 |
|---|
public S batchSize(int batchSize)
BatchUpdate の記述:
BatchUpdate<S extends BatchUpdate<S>> 内の batchSizebatchSize - バッチ更新のサイズ
public int[] execute()
BatchUpdate の記述:
BatchUpdate<S extends BatchUpdate<S>> 内の executepublic java.util.List<T> getEntities()
protected void prepareSql()
protected abstract java.lang.String toSql()
protected int[] executeInternal()
protected int[] executeBatch(java.sql.PreparedStatement ps)
ps - 準備されたステートメント
protected java.sql.PreparedStatement getPreparedStatement(JdbcContext jdbcContext)
jdbcContext - JDBCコンテキスト
protected java.sql.PreparedStatement createPreparedStatement(JdbcContext jdbcContext)
jdbcContext - JDBCコンテキスト
protected abstract void prepareParams(T entity)
entity - エンティティprotected abstract boolean isOptimisticLock()
trueを返します。
true
protected void validateRows(java.sql.PreparedStatement ps,
int[] rows)
ps - 準備されたステートメントrows - 更新行数の配列
OptimisticLockException - 行を更新または削除できなかった場合protected void incrementVersions()
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||