Top Description Fields Constructors Methods
org.hibernate.query

public final Enum NullPrecedence

extends Enum<NullPrecedence>
Class Inheritance
Imports
org.hibernate.AssertionFailure, org.hibernate.dialect.NullOrdering

Enumerates the possibilities for the precedence of null values within query result sets sorted by an ORDER BY clause.
Author
Lukasz Antoniak

Field Summary

Modifier and TypeField and Description
public static final NullPrecedence
FIRST

Null values appear at the beginning of the sorted collection.

public static final NullPrecedence
LAST

Null values appear at the end of the sorted collection.

public static final NullPrecedence
NONE

Null precedence not specified.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
isDefaultOrdering(SortDirection sortOrder, NullOrdering nullOrdering)

Is this null precedence the default for the given sort order and null ordering.

public static NullPrecedence

Returns:

The recognized NullPrecedence, or null
parse
(String
The String representation to interpret
name
)

Interprets a string representation of a NullPrecedence, returning null by default.

public static NullPrecedence

Returns:

The recognized NullPrecedence, or defaultValue.
parse
(String
The String representation to interpret
name
,
NullPrecedence
The default value to use
defaultValue
)

Interprets a string representation of a NullPrecedence, returning the specified default if not recognized.

public static NullPrecedence
public static NullPrecedence[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FIRSTback to summary
public static final NullPrecedence FIRST

Null values appear at the beginning of the sorted collection.

LASTback to summary
public static final NullPrecedence LAST

Null values appear at the end of the sorted collection.

NONEback to summary
public static final NullPrecedence NONE

Null precedence not specified. Relies on the RDBMS implementation.

Constructor Detail

NullPrecedenceback to summary
private NullPrecedence()

Method Detail

isDefaultOrderingback to summary
public boolean isDefaultOrdering(SortDirection sortOrder, NullOrdering nullOrdering)

Is this null precedence the default for the given sort order and null ordering.

parseback to summary
public static NullPrecedence parse(String name)

Interprets a string representation of a NullPrecedence, returning null by default. For alternative default handling, see parse(String, NullPrecedence)

Parameters
name:String

The String representation to interpret

Returns:NullPrecedence

The recognized NullPrecedence, or null

parseback to summary
public static NullPrecedence parse(String name, NullPrecedence defaultValue)

Interprets a string representation of a NullPrecedence, returning the specified default if not recognized.

Parameters
name:String

The String representation to interpret

defaultValue:NullPrecedence

The default value to use

Returns:NullPrecedence

The recognized NullPrecedence, or defaultValue.

valueOfback to summary
public static NullPrecedence valueOf(String name)
valuesback to summary
public static NullPrecedence[] values()