|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.kuina.dao.internal.command.AbstractCommand
org.seasar.kuina.dao.internal.command.AbstractQueryCommand
org.seasar.kuina.dao.internal.command.AbstractDynamicQueryCommand
public abstract class AbstractDynamicQueryCommand
動的にJPQLを生成して問い合わせを行うCommandの共通機能を提供する抽象クラスです.
| フィールドの概要 | |
|---|---|
protected boolean |
distinct
Daoメソッドに Distinctアノテーションが指定されていればtrue |
protected static Map<String,JoinSpec> |
EMPTY_MAP
空の Map |
protected FetchJoin[] |
fetchJoins
フェッチ結合指定の配列 |
protected String |
identificationVariable
問い合わせ対象エンティティのidentification_variable |
protected OrderbySpec[] |
orderbySpecs
ORDER BY指定の配列 |
| クラス org.seasar.kuina.dao.internal.command.AbstractQueryCommand から継承されたフィールド |
|---|
entityClass, flushMode, hints, method, resultList |
| コンストラクタの概要 | |
|---|---|
AbstractDynamicQueryCommand(Class<?> entityClass,
Method method,
boolean resultList)
インスタンスを構築します。 |
|
| メソッドの概要 | |
|---|---|
protected abstract List<String> |
bindParameter(SelectStatement statement,
Object[] arguments)
Daoメソッドの引数をパラメータ値としてSELECT文にバインドします. |
protected Map<String,JoinSpec> |
createFetchJoinAssociations(String abstractSchemaName)
フェッチ結合する関連の Mapを返します. |
protected IdentificationVariableDeclaration |
createIdentificationVariableDeclaration(List<String> boundProperties)
SELECT文のFROM句 (identification_variable_declaration) を作成して返します. |
protected Set<String> |
createJoinAssociations(List<String> boundProperties)
結合する関連の Setを返します. |
protected SelectStatement |
createSelectStatement(Object[] arguments)
SELECT文を作成して返します. |
protected boolean |
detectDistinct()
Daoメソッドに Distinctアノテーションが指定されていればtrueを返します. |
protected FetchJoin[] |
detectFetchJoins()
Daoメソッドに FetchJoinsアノテーションまたはFetchJoinアノテーションが指定されていれば,フェッチ結合指定の配列を返します. |
protected OrderbySpec[] |
detectOrderbySpec()
Daoメソッドに Orderbyアノテーションが指定されていれば,ORDER BY指定の配列を返します. |
Object |
execute(EntityManager em,
Object[] arguments)
Daoのオペレーションを実行します. |
| クラス org.seasar.kuina.dao.internal.command.AbstractQueryCommand から継承されたメソッド |
|---|
setupQuery, setupStatement |
| クラス org.seasar.kuina.dao.internal.command.AbstractCommand から継承されたメソッド |
|---|
detectFlushMode, detectHints, getHintValue |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected static final Map<String,JoinSpec> EMPTY_MAP
Map
protected boolean distinct
Distinctアノテーションが指定されていればtrue
protected String identificationVariable
protected FetchJoin[] fetchJoins
protected OrderbySpec[] orderbySpecs
| コンストラクタの詳細 |
|---|
public AbstractDynamicQueryCommand(Class<?> entityClass,
Method method,
boolean resultList)
entityClass - 問い合わせ対象のエンティティ・クラスmethod - DaoメソッドresultList - 問い合わせ結果をListで返す場合にtrue| メソッドの詳細 |
|---|
public Object execute(EntityManager em,
Object[] arguments)
Command の記述:
em - エンティティ・マネージャarguments - Daoのメソッド引数
protected boolean detectDistinct()
Distinctアノテーションが指定されていればtrueを返します.
Distinctアノテーションが指定されていればtrueprotected FetchJoin[] detectFetchJoins()
FetchJoinsアノテーションまたはFetchJoinアノテーションが指定されていれば,フェッチ結合指定の配列を返します.
DaoメソッドにFetchJoinsアノテーションもFetchJoinアノテーションお指定されていなければnullを返します.
protected OrderbySpec[] detectOrderbySpec()
Orderbyアノテーションが指定されていれば,ORDER BY指定の配列を返します.
DaoメソッドにOrderbyアノテーションが指定されていなければnullを返します.
IllegalOrderbyException - Orderbyアノテーションのvalue要素の指定が不正な場合にスローされますprotected SelectStatement createSelectStatement(Object[] arguments)
作成したSELECT文にDaoメソッドの引数をパラメータ値としてバインドします.
arguments - Daoメソッドの引数
protected abstract List<String> bindParameter(SelectStatement statement,
Object[] arguments)
statement - SELECT文arguments - Daoメソッドの引数
Listprotected IdentificationVariableDeclaration createIdentificationVariableDeclaration(List<String> boundProperties)
boundProperties - SELECT文にバインドしたパラメータ名のList
protected Map<String,JoinSpec> createFetchJoinAssociations(String abstractSchemaName)
Mapを返します.
abstractSchemaName - 問い合わせの基点となるエンティティのabstract_schema_name
Mapprotected Set<String> createJoinAssociations(List<String> boundProperties)
Setを返します.
boundProperties - SELECT文にバインドしたパラメータ名のList
Set
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||