パッケージ org.iplass.mtp.entity
クラス SearchResult<T>
java.lang.Object
org.iplass.mtp.entity.SearchResult<T>
- すべての実装されたインタフェース:
AutoCloseable,Iterable<T>
検索結果をあらわすクラスです。
-
ネストされたクラスの概要
ネストされたクラス -
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明voidclose()SearchResultをクローズする。getFirst()先頭の1件目のデータを取得する。getList()当該SearchResultのResultModeを取得。intLimitで取得件数を絞っていた場合、実際の全件数を返却する。<P> List<P>getValueList(int index) 検索結果Listのうち、当該index項目のみのリストを取得する。<P> List<P>getValueList(String propertyName) 検索結果EntityListのうち、当該propertyName項目のみのリストを取得する。iterator()クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitインタフェースから継承されたメソッド java.lang.Iterable
forEach, spliterator
-
コンストラクタの詳細
-
SearchResult
-
-
メソッドの詳細
-
getTotalCount
public int getTotalCount()Limitで取得件数を絞っていた場合、実際の全件数を返却する。 この値を取得するためには、EntityManagerの検索メソッド呼び出し時に、checkTotalCountsフラグをtrueにして検索する必要がある。 このフラグをfalseで検索した場合は、totalCountの値は-1となる。- 戻り値:
-
getList
-
getFirst
先頭の1件目のデータを取得する。- 戻り値:
- 1件目のデータ。検索結果がない場合はnull。
-
getValueList
検索結果EntityListのうち、当該propertyName項目のみのリストを取得する。 TがEntityの場合(EntityManager#searchEntity())のみ当該メソッド利用可能。- パラメータ:
propertyName- Listとして取得したいpropertyName- 戻り値:
-
getValueList
検索結果Listのうち、当該index項目のみのリストを取得する。 TがObject[]の場合(EntityManager#search())のみ当該メソッド利用可能。- パラメータ:
index- Listとして取得したい値のインデックス(0始まり)- 戻り値:
-
iterator
-
getResultMode
当該SearchResultのResultModeを取得。- 戻り値:
-
close
public void close()SearchResultをクローズする。SearchResult.ResultMode.STREAMの場合は、当該SearchResult利用後、呼び出し必須。- 定義:
closeインタフェース内AutoCloseable
-