org.seasar.extension.jdbc.query
クラス AutoInsertImpl<T>

java.lang.Object
  上位を拡張 org.seasar.extension.jdbc.query.AbstractQuery<S>
      上位を拡張 org.seasar.extension.jdbc.query.AbstractAutoUpdate<T,AutoInsert<T>>
          上位を拡張 org.seasar.extension.jdbc.query.AutoInsertImpl<T>
型パラメータ:
T - エンティティの型です。
すべての実装されたインタフェース:
AutoInsert<T>, Query<AutoInsert<T>>, SqlLogger, Update<AutoInsert<T>>

public class AutoInsertImpl<T>
extends AbstractAutoUpdate<T,AutoInsert<T>>
implements AutoInsert<T>

AutoInsertの実装クラスです。

作成者:
koichik

フィールドの概要
protected  boolean excludesNull
          null値のプロパティを挿入から除外する場合true
protected  Set<String> excludesProperties
          挿入から除外するプロパティ
protected  Set<String> includesProperties
          挿入対象とするプロパティ
protected static Long INITIAL_VERSION
          バージョンプロパティの初期値
protected static String INSERT_STATEMENT
          INSERT文
protected  IntoClause intoClause
          into句
protected  List<PropertyMeta> targetProperties
          挿入対象となるプロパティメタデータのList
protected  boolean useGetGeneratedKeys
          Statement.getGeneratedKeys()を使用する場合はtrue
protected  ValuesClause valuesClause
          values句
 
クラス org.seasar.extension.jdbc.query.AbstractAutoUpdate から継承されたフィールド
entity, entityMeta, suppresOptimisticLockException
 
クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド
callerClass, callerMethodName, completed, executedSql, jdbcManager, logger, paramList, queryTimeout
 
コンストラクタの概要
AutoInsertImpl(JdbcManagerImplementor jdbcManager, T entity)
           
 
メソッドの概要
protected  PreparedStatement createPreparedStatement(JdbcContext jdbcContext)
          準備されたステートメントを作成します。
 AutoInsert<T> excludes(CharSequence... propertyNames)
          指定のプロパティを挿入対象から除外します。
 AutoInsert<T> excludesNull()
          null値のプロパティを挿入対象から除外します。
protected  Object getIdValue(PropertyMeta propertyMeta)
          バインドする識別子の値を返します。
 AutoInsert<T> includes(CharSequence... propertyNames)
          指定のプロパティのみを挿入対象とします。
protected  boolean isOptimisticLock()
          楽観的同時実行制御を行っている場合はtrueを返します。
protected  void postExecute(PreparedStatement ps)
          準備されたステートメントの後処理を行います。
protected  void prepare(String methodName)
          クエリの準備をします。
protected  void prepareIntoClause()
          into句の準備をします。
protected  void prepareParams()
          バインド変数を準備します.
protected  void prepareTargetProperties()
          into句およびvalues句に設定されるプロパティの準備をします。
protected  void prepareValuesClause()
          value句の準備をします。
protected  String toSql()
          SQLに変換します。
 
クラス org.seasar.extension.jdbc.query.AbstractAutoUpdate から継承されたメソッド
execute, executeInternal, getEntity, getEntityMeta, getPreparedStatement, incrementVersion, prepareSql, validateRows
 
クラス 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, 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
 

フィールドの詳細

INSERT_STATEMENT

protected static final String INSERT_STATEMENT
INSERT文

関連項目:
定数フィールド値

INITIAL_VERSION

protected static final Long INITIAL_VERSION
バージョンプロパティの初期値


excludesNull

protected boolean excludesNull
null値のプロパティを挿入から除外する場合true


includesProperties

protected final Set<String> includesProperties
挿入対象とするプロパティ


excludesProperties

protected final Set<String> excludesProperties
挿入から除外するプロパティ


targetProperties

protected final List<PropertyMeta> targetProperties
挿入対象となるプロパティメタデータのList


intoClause

protected final IntoClause intoClause
into句


valuesClause

protected final ValuesClause valuesClause
values句


useGetGeneratedKeys

protected boolean useGetGeneratedKeys
Statement.getGeneratedKeys()を使用する場合はtrue

コンストラクタの詳細

AutoInsertImpl

public AutoInsertImpl(JdbcManagerImplementor jdbcManager,
                      T entity)
パラメータ:
jdbcManager - 内部的なJDBCマネージャ
entity - エンティティ
メソッドの詳細

excludesNull

public AutoInsert<T> excludesNull()
インタフェース AutoInsert の記述:
null値のプロパティを挿入対象から除外します。

定義:
インタフェース AutoInsert<T> 内の excludesNull
戻り値:
このインスタンス自身

includes

public AutoInsert<T> includes(CharSequence... propertyNames)
インタフェース AutoInsert の記述:
指定のプロパティのみを挿入対象とします。

定義:
インタフェース AutoInsert<T> 内の includes
パラメータ:
propertyNames - 挿入対象とするプロパティ名の並び
戻り値:
このインスタンス自身

excludes

public AutoInsert<T> excludes(CharSequence... propertyNames)
インタフェース AutoInsert の記述:
指定のプロパティを挿入対象から除外します。

定義:
インタフェース AutoInsert<T> 内の excludes
パラメータ:
propertyNames - 挿入対象から除外するプロパティ名の並び
戻り値:
このインスタンス自身

prepare

protected void prepare(String methodName)
クラス AbstractQuery の記述:
クエリの準備をします。

定義:
クラス AbstractQuery<AutoInsert<T>> 内の prepare
パラメータ:
methodName - メソッド名

prepareTargetProperties

protected void prepareTargetProperties()
into句およびvalues句に設定されるプロパティの準備をします。


prepareIntoClause

protected void prepareIntoClause()
into句の準備をします。


prepareValuesClause

protected void prepareValuesClause()
value句の準備をします。


prepareParams

protected void prepareParams()
バインド変数を準備します.


getIdValue

protected Object getIdValue(PropertyMeta propertyMeta)
バインドする識別子の値を返します。

パラメータ:
propertyMeta - プロパティメタデータ
戻り値:
識別子の値

toSql

protected String toSql()
SQLに変換します。

定義:
クラス AbstractAutoUpdate<T,AutoInsert<T>> 内の toSql
戻り値:
SQL

createPreparedStatement

protected PreparedStatement createPreparedStatement(JdbcContext jdbcContext)
クラス AbstractAutoUpdate の記述:
準備されたステートメントを作成します。

オーバーライド:
クラス AbstractAutoUpdate<T,AutoInsert<T>> 内の createPreparedStatement
パラメータ:
jdbcContext - JDBCコンテキスト
戻り値:
準備されたステートメント

postExecute

protected void postExecute(PreparedStatement ps)
クラス AbstractAutoUpdate の記述:
準備されたステートメントの後処理を行います。

オーバーライド:
クラス AbstractAutoUpdate<T,AutoInsert<T>> 内の postExecute
パラメータ:
ps - 準備されたステートメント

isOptimisticLock

protected boolean isOptimisticLock()
クラス AbstractAutoUpdate の記述:
楽観的同時実行制御を行っている場合はtrueを返します。

定義:
クラス AbstractAutoUpdate<T,AutoInsert<T>> 内の isOptimisticLock
戻り値:
楽観的同時実行制御を行っている場合はtrue


Copyright © 2004-2012 The Seasar Foundation. All Rights Reserved.