|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.extension.jdbc.query.AbstractQuery<S>
org.seasar.extension.jdbc.query.AbstractAutoUpdate<T,AutoUpdate<T>>
org.seasar.extension.jdbc.query.AutoUpdateImpl<T>
T - エンティティの型です。public class AutoUpdateImpl<T>
AutoUpdateの実装クラスです。
| フィールドの概要 | |
|---|---|
protected Map<String,Object> |
beforeStates
更新前のプロパティの状態を持つ Map |
protected boolean |
excludesNull
null値のプロパティを更新から除外する場合true |
protected Set<String> |
excludesProperties
更新から除外するプロパティ |
protected Set<String> |
includesProperties
更新対象とするプロパティ |
protected boolean |
includeVersion
バージョンプロパティを更新対象に含める場合 true |
protected SetClause |
setClause
set句 |
protected List<PropertyMeta> |
targetProperties
更新対象となるプロパティメタデータの List |
protected static String |
UPDATE_STATEMENT
UDPATE文 |
protected WhereClause |
whereClause
where句 |
| クラス org.seasar.extension.jdbc.query.AbstractAutoUpdate から継承されたフィールド |
|---|
entity, entityMeta, suppresOptimisticLockException |
| クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド |
|---|
callerClass, callerMethodName, executedSql, jdbcManager, logger, paramList, queryTimeout |
| コンストラクタの概要 | |
|---|---|
AutoUpdateImpl(JdbcManagerImplementor jdbcManager,
T entity)
|
|
| メソッドの概要 | |
|---|---|
AutoUpdate<T> |
changedFrom(Map<String,? extends Object> beforeStates)
beforeから変更のあったプロパティだけを更新対象とします。 |
AutoUpdate<T> |
changedFrom(T beforeEntity)
beforeから変更のあったプロパティだけを更新対象とします。 |
AutoUpdate<T> |
excludes(CharSequence... propertyNames)
指定のプロパティを更新対象から除外します。 |
AutoUpdate<T> |
excludesNull()
null値のプロパティを更新対象から除外します。 |
AutoUpdate<T> |
includes(CharSequence... propertyNames)
指定のプロパティのみを更新対象とします。 |
AutoUpdate<T> |
includesVersion()
バージョンプロパティを通常の更新対象に含め、バージョンチェックの対象外とします。 |
protected void |
incrementVersion()
バージョンの値を増加させます。 |
protected boolean |
isOptimisticLock()
楽観的同時実行制御を行っている場合は trueを返します。 |
protected void |
prepare(String methodName)
クエリの準備をします。 |
protected void |
prepareParams()
バインド変数を準備します. |
protected void |
prepareSetClause()
set句の準備をします。 |
protected void |
prepareTargetProperties()
set句に設定されるプロパティの準備をします。 |
protected void |
prepareWhereClause()
where句の準備をします。 |
AutoUpdate<T> |
suppresOptimisticLockException()
バージョンチェックを行った場合に、 更新行数が0行でも OptimisticLockExceptionをスローしないようにします。 |
protected String |
toSql()
SQLに変換します。 |
| クラス org.seasar.extension.jdbc.query.AbstractAutoUpdate から継承されたメソッド |
|---|
createPreparedStatement, execute, executeInternal, getEntity, getEntityMeta, getPreparedStatement, postExecute, prepareSql, validateRows |
| クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたメソッド |
|---|
addParam, addParam, addParam, addParam, callerClass, callerMethodName, getCallerClass, getCallerMethodName, getExecutedSql, getJdbcManager, getParam, getParamClasses, getParamSize, getParamValues, getParamValueTypes, getQueryTimeout, getValueType, handleResultSet, logSql, logSql, prepareCallerClassAndMethodName, prepareInParams, queryTimeout, resetParams, toStringArray |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース org.seasar.extension.jdbc.Update から継承されたメソッド |
|---|
execute |
| インタフェース org.seasar.extension.jdbc.Query から継承されたメソッド |
|---|
callerClass, callerMethodName, queryTimeout |
| フィールドの詳細 |
|---|
protected static final String UPDATE_STATEMENT
protected boolean includeVersion
true
protected boolean excludesNull
null値のプロパティを更新から除外する場合true
protected final Set<String> includesProperties
protected final Set<String> excludesProperties
protected Map<String,Object> beforeStates
Map
protected final List<PropertyMeta> targetProperties
List
protected final SetClause setClause
protected final WhereClause whereClause
| コンストラクタの詳細 |
|---|
public AutoUpdateImpl(JdbcManagerImplementor jdbcManager,
T entity)
jdbcManager - 内部的なJDBCマネージャentity - エンティティ| メソッドの詳細 |
|---|
public AutoUpdate<T> includesVersion()
AutoUpdate の記述:
このメソッドが呼び出されると、update文のwhere句にはバージョンのチェックが含まれなくなり、
バージョンプロパティは通常のプロパティと同じように更新対象に含められます (AutoUpdate.excludesNull()やAutoUpdate.changedFrom(Object)等も同じように適用されます)。
AutoUpdate<T> 内の includesVersionpublic AutoUpdate<T> excludesNull()
AutoUpdate の記述: null値のプロパティを更新対象から除外します。
AutoUpdate<T> 内の excludesNullpublic AutoUpdate<T> includes(CharSequence... propertyNames)
AutoUpdate の記述:
AutoUpdate<T> 内の includespropertyNames - 更新対象とするプロパティ名の並び
public AutoUpdate<T> excludes(CharSequence... propertyNames)
AutoUpdate の記述:
AutoUpdate<T> 内の excludespropertyNames - 更新対象から除外するプロパティ名の並び
public AutoUpdate<T> changedFrom(T beforeEntity)
AutoUpdate の記述: beforeから変更のあったプロパティだけを更新対象とします。
AutoUpdate<T> 内の changedFrombeforeEntity - 変更前の状態を持つエンティティ
public AutoUpdate<T> changedFrom(Map<String,? extends Object> beforeStates)
AutoUpdate の記述: beforeから変更のあったプロパティだけを更新対象とします。
AutoUpdate<T> 内の changedFrombeforeStates - 変更前の状態を持つMap
public AutoUpdate<T> suppresOptimisticLockException()
AutoUpdate の記述: OptimisticLockExceptionをスローしないようにします。
AutoUpdate<T> 内の suppresOptimisticLockExceptionprotected void prepare(String methodName)
AbstractQuery の記述:
AbstractQuery<AutoUpdate<T>> 内の preparemethodName - メソッド名protected void prepareTargetProperties()
protected void prepareSetClause()
protected void prepareWhereClause()
protected void prepareParams()
protected String toSql()
AbstractAutoUpdate<T,AutoUpdate<T>> 内の toSqlprotected boolean isOptimisticLock()
AbstractAutoUpdate の記述: trueを返します。
AbstractAutoUpdate<T,AutoUpdate<T>> 内の isOptimisticLocktrueprotected void incrementVersion()
AbstractAutoUpdate の記述:
AbstractAutoUpdate<T,AutoUpdate<T>> 内の incrementVersion
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||