Enum Class KeyType
- All Implemented Interfaces:
FindOption, Serializable, Comparable<KeyType>, Constable
FindOption allowing to load based on either id (default) or natural-id.
- Since:
- 7.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates to find by the entity's identifier.Indicates to find based on the entity's natural-id, if one. -
Method Summary
-
Enum Constant Details
-
IDENTIFIER
Indicates to find by the entity's identifier. The default.- See Also:
-
NATURAL
Indicates to find based on the entity's natural-id, if one.- See Also:
- Implementation Specification:
- Will trigger an
IllegalArgumentExceptionif the entity does not define a natural-id.
-
-
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
-