|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.extension.jdbc.query.AbstractQuery<S>
org.seasar.extension.jdbc.query.AbstractSelect<T,AutoSelect<T>>
org.seasar.extension.jdbc.query.AutoSelectImpl<T>
T - エンティティの型です。public class AutoSelectImpl<T>
AutoSelectの実装クラスです。
| フィールドの概要 | |
|---|---|
protected Map<String,? extends Object> |
conditions
Mapによるwhere句の条件指定です。 |
protected String |
criteria
クライテリアです。 |
protected Object[] |
criteriaParams
クライテリア内のパラメータの配列です。 |
protected String[] |
criteriaPropertyNames
クライテリア内のパラメータに対応するプロパティ名の配列です。 |
protected Set<String> |
eagerProperties
EAGERフェッチするプロパティです。 |
protected Map<String,AbstractEntityMapper> |
entityMapperMap
エンティティマッパーのマップです。 |
protected Map<String,EntityMeta> |
entityMetaMap
エンティティメタデータのマップです。 |
protected String |
entityName
エンティティ名です。 |
protected String |
forUpdate
SELECT ~ FOR UPDATEのSQL文字列です。 |
protected Map<String,String> |
forUpdateTargets
SELECT ~ FOR UPDATEでロック対象となるエンティティからプロパティへのマップです。 |
protected SelectForUpdateType |
forUpdateType
SELECT ~ FOR UPDATEのタイプです。 |
protected int |
forUpdateWaitSeconds
SELECT ~ FOR UPDATEでの待機時間 (秒単位) です。 |
protected FromClause |
fromClause
from句です。 |
protected String |
hint
ヒントです。 |
protected Object[] |
idProperties
IDプロパティの値の配列です。 |
protected List<PropertyMeta> |
idPropertyMetaList
IDプロパティのメタデータのリストです。 |
protected List<JoinMeta> |
joinMetaList
結合メタデータのリストです。 |
protected String |
orderBy
ソート順です。 |
protected OrderByClause |
orderByClause
order by句です。 |
protected SelectClause |
selectClause
select句です。 |
protected int |
selectListIndex
selectリストのインデックスです。 |
protected Map<String,String> |
tableAliasMap
テーブル別名のマップです。 |
protected int |
tableIndex
テーブルのインデックスです。 |
protected List<ValueType> |
valueTypeList
値タイプのリストです。 |
protected Object |
versionProperty
バージョンプロパティの値です。 |
protected PropertyMeta |
versionPropertyMeta
バージョンプロパティのメタデータです。 |
protected WhereClause |
whereClause
where句です。 |
protected List<Object> |
whereParams
where句のパラメータです。 |
| クラス org.seasar.extension.jdbc.query.AbstractSelect から継承されたフィールド |
|---|
baseClass, count, disallowNoResult, fetchSize, limit, maxRows, offset, resultLob, resultTemporalType |
| クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド |
|---|
callerClass, callerMethodName, executedSql, jdbcManager, logger, paramList, queryTimeout |
| コンストラクタの概要 | |
|---|---|
AutoSelectImpl(JdbcManagerImplementor jdbcManager,
Class<T> baseClass)
AutoSelectImplを作成します。 |
|
| メソッドの概要 | |
|---|---|
protected String |
convertCriteria(String str)
プロパティ名で記述されたクライテリアをカラム名に変換します。 |
protected String |
convertCriteria(String str,
boolean convertAlias)
プロパティ名で記述されたクライテリアをカラム名に変換します。 |
protected String |
convertEntityNameToTableAlias(String str)
文字列中のエンティティ名をテーブルの別名に変換します。 |
protected ResultSetHandler |
createIterateResultSetHandler(IterationCallback<T,?> callback)
反復する結果セットハンドラを作成します。 |
protected AbstractRelationshipEntityMapper |
createRelationshipEntityMapper(Class<?> relationshipClass,
PropertyMapper[] propertyMappers,
int[] idIndices,
PropertyMeta propertyMeta,
PropertyMeta inversePropertyMeta)
関連エンティティマッパーを作成します。 |
protected ResultSetHandler |
createResultListResultSetHandler()
リストを返す結果セットハンドラを作成します。 |
protected ResultSetHandler |
createSingleResultResultSetHandler()
単独の値を返す結果セットハンドラを作成します。 |
protected String |
createTableAlias()
テーブル別名を作成します。 |
AutoSelect<T> |
eager(CharSequence... propertyNames)
EAGERフェッチするプロパティを追加します。 |
AutoSelect<T> |
forUpdate()
FOR UPDATEを追加します。 |
AutoSelect<T> |
forUpdate(CharSequence... propertyNames)
FOR UPDATEを追加します。 |
AutoSelect<T> |
forUpdateNowait()
FOR UPDATE NOWAITを追加します。 |
AutoSelect<T> |
forUpdateNowait(CharSequence... propertyNames)
FOR UPDATE NOWAITを追加します。 |
AutoSelect<T> |
forUpdateWait(int seconds)
FOR UPDATE WAITを追加します。 |
AutoSelect<T> |
forUpdateWait(int seconds,
CharSequence... propertyNames)
FOR UPDATE WAITを追加します。 |
protected AbstractEntityMapper |
getBaseEntityMapper(String join,
String baseJoin)
ベースのエンティティメタマッパーを返します。 |
protected EntityMeta |
getBaseEntityMeta(String join,
String base)
ベースのエンティティメタデータを返します。 |
protected EntityMapper |
getEntityMapper()
エンティティマッパーを返します。 |
protected AbstractEntityMapper |
getEntityMapper(String join)
エンティティマッパーを返します。 |
protected EntityMeta |
getEntityMeta(String join)
エンティティメタデータを返します。 |
protected EntityMeta |
getInverseEntityMeta(Class<?> relationshipClass,
String join)
関連の逆側のエンティティメタデータを返します。 |
protected PropertyMeta |
getInversePropertyMeta(EntityMeta inverseEntityMeta,
PropertyMeta relationshipPropertyMeta)
逆側のプロパティメタデータを返します。 |
protected JoinMeta |
getJoinMeta(int index)
結合メタデータを返します。 |
protected int |
getJoinMetaSize()
結合メタデータの数を返します。 |
protected String |
getLockHint(String baseName)
ロックヒントを返します。 |
protected PropertyMeta |
getPropertyMeta(EntityMeta baseEntityMeta,
String fullPropertyName,
String propertyName)
プロパティメタデータを返します。 |
protected String |
getTableAlias(String join)
テーブル別名を返します。 |
protected ValueType[] |
getValueTypes()
値タイプの配列を返します。 |
AutoSelect<T> |
hint(String hint)
ヒントを設定します。 |
AutoSelect<T> |
id(Object... idProperties)
where句の条件にIdプロパティ(主キー)を指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name)
内部結合するプロパティを指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name,
boolean fetch)
内部結合するプロパティを指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name,
boolean fetch,
String condition,
Object... params)
内部結合するプロパティを指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name,
boolean fetch,
Where condition)
内部結合するプロパティを指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name,
String condition,
Object... params)
内部結合するプロパティを指定します。 |
AutoSelect<T> |
innerJoin(CharSequence name,
Where condition)
内部結合するプロパティを指定します。 |
protected boolean |
isLazy(PropertyMeta propertyMeta,
JoinMeta joinMeta)
プロパティのフェッチタイプがLAZYならtrueを返します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType)
結合するプロパティを指定します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType,
boolean fetch)
結合するプロパティを指定します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType,
boolean fetch,
String condition,
Object... params)
結合するプロパティを指定します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType,
boolean fetch,
Where condition)
結合するプロパティを指定します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType,
String condition,
Object... params)
結合するプロパティを指定します。 |
AutoSelect<T> |
join(CharSequence name,
JoinType joinType,
Where condition)
結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name,
boolean fetch)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name,
boolean fetch,
String condition,
Object... params)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name,
boolean fetch,
Where condition)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name,
String condition,
Object... params)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
leftOuterJoin(CharSequence name,
Where condition)
左外部結合するプロパティを指定します。 |
AutoSelect<T> |
orderBy(OrderByItem... orderByItems)
ソート順を指定します。 |
AutoSelect<T> |
orderBy(String orderBy)
ソート順を指定します。 |
protected void |
prepare(String methodName)
クエリの準備をします。 |
protected void |
prepareCondition(WhereClause whereTerm,
String name,
Object value)
条件を準備します。 |
protected void |
prepareConditions()
where句の条件を準備します。 |
protected void |
prepareCriteria()
クライテリアの準備をします。 |
protected void |
prepareEntity(EntityMeta em,
JoinMeta joinMeta,
String tableAlias,
List<PropertyMapper> propertyMapperList,
List<Integer> idIndexList)
エンティティの準備をします。 |
protected EntityMeta |
prepareEntityMeta(Class<?> entityClass,
String join)
エンティティメタデータを準備します。 |
protected void |
prepareForUpdate()
FOR UPDATE句を準備します。 |
protected void |
prepareIdVersion()
IDプロパティ及びバージョンを準備します。 |
protected void |
prepareJoin(JoinMeta joinMeta)
結合の準備をします。 |
protected void |
prepareJoins()
結合の準備をします。 |
protected void |
prepareOrderBy()
order by句の準備をします。 |
protected void |
prepareParams()
パラメータを準備します。 |
protected void |
prepareParams(String name,
Object value)
パラメータを準備します。 |
protected void |
prepareSql()
SQLを準備します。 |
protected String |
prepareTableAlias(String join)
テーブル別名を準備します。 |
protected void |
prepareTarget()
対象エンティティの準備をします。 |
protected void |
prepareWhere()
where句のパラメータを準備します。 |
protected void |
setupForUpdateTargets(String[] propertyNames)
SELECT ~ FOR UPDATEの対象となるプロパティを準備します |
protected String[] |
splitBaseAndProperty(String name)
関連名をベースとプロパティに分離します。 |
protected Pair<String,String> |
toAliasPair(String baseName,
String propertyName)
SELECT ~ FOR UPDATEの対象となるテーブルエイリアスとカラムエイリアスのペアを返します。 |
protected int[] |
toIdIndexArray(List<Integer> idIndexList)
識別子のインデックスのリストをintの配列に変換します。 |
protected PropertyMapperImpl[] |
toPropertyMapperArray(List<PropertyMapper> propertyMapperList)
プロパティマッパーの配列に変換します。 |
protected String |
toSql()
SQLに変換します。 |
AutoSelect<T> |
version(Object versionProperty)
where句の条件にバージョンプロパティを指定します。 |
AutoSelect<T> |
where(Map<String,? extends Object> conditions)
where句の条件を指定します。 |
AutoSelect<T> |
where(String criteria,
Object... params)
where句の条件を指定します。 |
AutoSelect<T> |
where(Where... wheres)
where句の条件を指定します。 |
AutoSelect<T> |
where(Where where)
where句の条件を指定します。 |
| クラス org.seasar.extension.jdbc.query.AbstractSelect から継承されたメソッド |
|---|
convertLimitSql, disallowNoResult, fetchSize, getBaseClass, getCount, getFetchSize, getLimit, getMaxRows, getOffset, getResultList, getResultListInternal, getSingleResult, getSingleResultInternal, iterate, iterateInternal, limit, lob, maxRows, offset, processCursorPreparedStatement, processPreparedStatement, processResultSet, setupPreparedStatement, temporal |
| クラス 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.AutoSelect から継承されたメソッド |
|---|
getCount |
| インタフェース org.seasar.extension.jdbc.Select から継承されたメソッド |
|---|
disallowNoResult, fetchSize, getResultList, getSingleResult, iterate, limit, lob, maxRows, offset, temporal |
| インタフェース org.seasar.extension.jdbc.Query から継承されたメソッド |
|---|
callerClass, callerMethodName, queryTimeout |
| フィールドの詳細 |
|---|
protected List<JoinMeta> joinMetaList
protected int tableIndex
protected Map<String,String> tableAliasMap
protected Map<String,EntityMeta> entityMetaMap
protected String entityName
protected SelectClause selectClause
protected FromClause fromClause
protected WhereClause whereClause
protected OrderByClause orderByClause
protected String orderBy
protected String forUpdate
protected SelectForUpdateType forUpdateType
protected Map<String,String> forUpdateTargets
protected int forUpdateWaitSeconds
protected Set<String> eagerProperties
protected String hint
protected List<ValueType> valueTypeList
protected int selectListIndex
protected Map<String,AbstractEntityMapper> entityMapperMap
protected List<Object> whereParams
protected Map<String,? extends Object> conditions
protected String criteria
protected Object[] criteriaParams
protected String[] criteriaPropertyNames
protected List<PropertyMeta> idPropertyMetaList
protected Object[] idProperties
protected PropertyMeta versionPropertyMeta
protected Object versionProperty
| コンストラクタの詳細 |
|---|
public AutoSelectImpl(JdbcManagerImplementor jdbcManager,
Class<T> baseClass)
AutoSelectImplを作成します。
jdbcManager - 内部的なJDBCマネージャbaseClass - ベースクラス| メソッドの詳細 |
|---|
public AutoSelect<T> innerJoin(CharSequence name)
AutoSelect の記述: 指定したエンティティはフェッチされます。
AutoSelect<T> 内の innerJoinname - 内部結合する関連のプロパティ名
JoinMeta,
#Join(CharSequence, JoinType)
public AutoSelect<T> innerJoin(CharSequence name,
String condition,
Object... params)
AutoSelect の記述: 指定したエンティティはフェッチされます。
AutoSelect<T> 内の innerJoinname - 内部結合する関連のプロパティ名condition - 付加的な結合条件params - 付加的な結合条件のパラメータの配列
パラメータの配列の要素がDate、Calendarのいずれか場合、
Parameterに定義されたメソッドによりパラメータの時制を指定できます。
パラメータの配列の要素がString、byte[]、
Serializableのいずれかの場合、Parameter
に定義されたメソッドによりパラメータをラージオブジェクトとして扱えます。
JoinMeta,
#Join(CharSequence, JoinType)
public AutoSelect<T> innerJoin(CharSequence name,
Where condition)
AutoSelect の記述: 指定したエンティティはフェッチされます。
AutoSelect<