Enum Class FindMultipleOption.OrderingMode

java.lang.Object
java.lang.Enum<FindMultipleOption.OrderingMode>
org.hibernate.FindMultipleOption.OrderingMode
All Implemented Interfaces:
FindOption, Serializable, Comparable<FindMultipleOption.OrderingMode>, Constable, FindMultipleOption
Enclosing interface:
FindMultipleOption

public static enum FindMultipleOption.OrderingMode extends Enum<FindMultipleOption.OrderingMode> implements FindMultipleOption

Indicates whether the result list should be ordered relative to the position of the identifier list. E.g.

var 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
  • Enum Constant Details

  • Method Details

    • values

      public static FindMultipleOption.OrderingMode[] 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

      public static FindMultipleOption.OrderingMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null