Package org.iplass.mtp.entity
Enum SearchResult.ResultMode
- java.lang.Object
-
- java.lang.Enum<SearchResult.ResultMode>
-
- org.iplass.mtp.entity.SearchResult.ResultMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SearchResult.ResultMode>,java.lang.constant.Constable
- Enclosing class:
- SearchResult<T>
public static enum SearchResult.ResultMode extends java.lang.Enum<SearchResult.ResultMode>
検索結果の読み込みモードです。 EntityManagerの検索時にSearchOptionにて指定可能です。 デフォルトはAT_ONCEです。
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AT_ONCE一括で検索結果はメモリ上のListに読み込みます。 件数が限定される場合などに利用することを想定しています。SearchResult.close()は呼び出さずとも問題ありません。STREAM逐次、1件ずつ読み込み(pull形式)を行います。 Iterator#next()呼び出しで1件ずつ取得します。 STREAMで利用する場合は、SearchResult.close()の呼び出しが必須です。 iteratorは1度しか取得出来ないので注意してください。 また、STREAMが指定された場合は、Query結果キャッシュは行われません。 また、 STREAMが指定された場合は、SearchOptionにてreturnStructuredEntity指定は利用できません。
-
Method Summary
Modifier and Type Method Description static SearchResult.ResultModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SearchResult.ResultMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AT_ONCE
public static final SearchResult.ResultMode AT_ONCE
一括で検索結果はメモリ上のListに読み込みます。 件数が限定される場合などに利用することを想定しています。SearchResult.close()は呼び出さずとも問題ありません。
-
STREAM
public static final SearchResult.ResultMode STREAM
逐次、1件ずつ読み込み(pull形式)を行います。 Iterator#next()呼び出しで1件ずつ取得します。 STREAMで利用する場合は、SearchResult.close()の呼び出しが必須です。 iteratorは1度しか取得出来ないので注意してください。 また、STREAMが指定された場合は、Query結果キャッシュは行われません。 また、 STREAMが指定された場合は、SearchOptionにてreturnStructuredEntity指定は利用できません。
-
-
Method Detail
-
values
public static SearchResult.ResultMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SearchResult.ResultMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-