Package org.hibernate
Enum Class OrderingMode
- All Implemented Interfaces:
FindOption,Serializable,Comparable<OrderingMode>,Constable,FindMultipleOption
Indicates whether the result list should be ordered relative to the
position of the identifier list. E.g.
List<Person> results = session.findMultiple(
Person.class,
List.of(1,2,3,2),
ORDERED
);
assert results.get(0).getId() == 1;
assert results.get(1).getId() == 2;
assert results.get(2).getId() == 3;
assert results.get(3).getId() == 2;
The default is ORDERED.
- Since:
- 7.2
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic OrderingModeReturns the enum constant of this class with the specified name.static OrderingMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORDERED
The default. The result list is ordered relative to the position of the identifiers list.- See Also:
-
UNORDERED
The result list may be in any order.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-