Package org.hibernate.query
Enum Class NullPrecedence
- All Implemented Interfaces:
Serializable
,Comparable<NullPrecedence>
,java.lang.constant.Constable
Enumerates the possibilities for the precedence of null values within
query result sets sorted by an
ORDER BY
clause.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isDefaultOrdering
(SortDirection sortOrder, NullOrdering nullOrdering) Is this null precedence the default for the given sort order and null ordering.static NullPrecedence
Interprets a string representation of a NullPrecedence, returningnull
by default.static NullPrecedence
parse
(String name, NullPrecedence defaultValue) Interprets a string representation of a NullPrecedence, returning the specified default if not recognized.static NullPrecedence
Returns the enum constant of this class with the specified name.static NullPrecedence[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Null precedence not specified. Relies on the RDBMS implementation. -
FIRST
Null values appear at the beginning of the sorted collection. -
LAST
Null values appear at the end of the sorted collection.
-
-
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
-
isDefaultOrdering
Is this null precedence the default for the given sort order and null ordering. -
parse
Interprets a string representation of a NullPrecedence, returningnull
by default. For alternative default handling, seeparse(String, NullPrecedence)
- Parameters:
name
- The String representation to interpret- Returns:
- The recognized NullPrecedence, or
null
-
parse
Interprets a string representation of a NullPrecedence, returning the specified default if not recognized.- Parameters:
name
- The String representation to interpretdefaultValue
- The default value to use- Returns:
- The recognized NullPrecedence, or
defaultValue
.
-