| 
 | ||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
public interface SelectStatement
JPQLのselect_statementを表します.
JPQLの詳細はJPA仕様書「4.14 BNF」を参照してください.
 select_statement ::=
     select_clause from_clause [where_clause] [groupby_clause]
         [having_clause] [orderby_clause]
 
| メソッドの概要 | ||
|---|---|---|
|  SelectStatement | addHint(String name,
        Object value)問い合わせのヒントを追加します. | |
|  SelectStatement | from(Class<?>... entityClasses)FROM句にidentification_variable_declarationを追加します. | |
|  SelectStatement | from(Class<?> entityClass,
     String alias)FROM句にidentification_variable_declarationを追加します. | |
|  SelectStatement | from(IdentificationVariableDeclaration... declarations)FROM句にidentification_variable_declarationを追加します. | |
|  Query | getQuery(EntityManager em)Queryを作成して返します. | |
|  String | getQueryString()問い合わせ文字列 (JPQL) を返します. | |
| 
 | getResultList(EntityManager em)問い合わせを実行して結果を Listで返します. | |
| 
 | getSingleResult(EntityManager em)問い合わせを実行して単一の結果を返します. | |
|  SelectStatement | groupby(GroupbyItem... groupbyItems)GROUP BY句にgroupby_itemを追加します. | |
|  SelectStatement | groupby(String... groupbyItems)GROUP BY句にgroupby_itemを追加します. | |
|  SelectStatement | having(ConditionalExpression... conditionalExpressions)HAVING句にconditional_expressionを追加します. | |
|  SelectStatement | orderby(OrderbyItem... orderbyItems)ORDER BY句にorderby_itemを追加します. | |
|  SelectStatement | orderby(String... orderbyItems)ORDER BY句にorderby_itemを追加します. | |
|  SelectStatement | select(Object... selectExpression)SELECT句にselect_expressionを追加します. | |
|  SelectStatement | select(SelectExpression selectExpression)SELECT句にselect_expressionを追加します. | |
|  SelectStatement | select(String selectExpression)SELECT句にselect_expressionを追加します. | |
|  SelectStatement | setFirstResult(int startPosition)取得する結果セットの最初の位置を設定します. | |
|  SelectStatement | setFlushMode(FlushModeType flushMode)この問い合わせを実行する際のフラッシュモードを設定します. | |
|  SelectStatement | setMaxResults(int maxResult)取得する結果セットの最大件数を設定します. | |
|  SelectStatement | where(ConditionalExpression... conditionalExpressions)WHERE句にconditional_expressionを追加します. | |
| メソッドの詳細 | 
|---|
SelectStatement select(String selectExpression)
selectExpression - select_expression
SelectStatement select(SelectExpression selectExpression)
selectExpression - select_expression
SelectStatement select(Object... selectExpression)
selectExpression - select_expression
SelectStatement from(Class<?>... entityClasses)
entityClasses - identification_variable_declarationの並び
SelectStatement from(Class<?> entityClass,
                     String alias)
entityClass - abstract_schema_namesalias - identification_variable
SelectStatement from(IdentificationVariableDeclaration... declarations)
declarations - identification_variable_declarationの並び
SelectStatement where(ConditionalExpression... conditionalExpressions)
conditionalExpressions - conditional_expressionの並び
SelectStatement groupby(String... groupbyItems)
groupbyItems - groupby_itemの並び
SelectStatement groupby(GroupbyItem... groupbyItems)
groupbyItems - groupby_itemの並び
SelectStatement having(ConditionalExpression... conditionalExpressions)
conditionalExpressions - conditional_expressionの並び
SelectStatement orderby(String... orderbyItems)
orderbyItems - orderby_itemの並び
SelectStatement orderby(OrderbyItem... orderbyItems)
orderbyItems - orderby_itemの並び
SelectStatement setFirstResult(int startPosition)
位置は0から始まります.
startPosition - 取得する結果セットの最初の位置
Query.setFirstResult(int)SelectStatement setMaxResults(int maxResult)
maxResult - 取得する結果セットの最大件数
Query.setMaxResults(int)SelectStatement setFlushMode(FlushModeType flushMode)
flushMode - フラッシュモード
Query.setFlushMode(javax.persistence.FlushModeType)
SelectStatement addHint(String name,
                        Object value)
name - ヒントの名前value - ヒントの値
Query.setHint(String, Object)<T> List<T> getResultList(EntityManager em)
Listで返します.
T - 戻り値のリストの要素型em - エンティティ・マネージャ
Query.getResultList()<T> T getSingleResult(EntityManager em)
T - 戻り値のリストの要素型em - エンティティ・マネージャ
Query.getSingleResult()String getQueryString()
Query getQuery(EntityManager em)
Queryを作成して返します.
em - エンティティ・マネージャ
Query| 
 | ||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||