Top Description Methods
org.jooq

public non-sealed Interface SortField<T>

extends OrderField<T>
Known Direct Implementers
org.jooq.impl.NoField, org.jooq.impl.SortFieldImpl
Type Parameters
<T>
The field type
Imports
org.jooq.impl.QOM, .QOM.NullOrdering, org.jetbrains.annotations.NotNull, .Nullable, .ApiStatus.Experimental

A sort specification.

The SQL ORDER BY clause accepts expressions based on Field, which may be enhanced by ASC or DESC as well as NULLS FIRST or NULLS LAST.

Example:


// Assuming import static org.jooq.impl.DSL.*;

using(configuration)
   .select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME)
   .from(ACTOR)
   .orderBy(ACTOR.LAST_UPDATE.desc().nullsLast())
   .fetch();

Instances can be created using Field#asc(), Field#desc() and related methods.

Author
Lukas Eder
See Also
Field#asc(), Field#desc()

Method Summary

Modifier and TypeMethod and Description
public @NotNull Field<T>
$field()

Deprecated as a consequence of Field being deprecated.
Experimental query object model accessor method, see also QOM.
public <U> @NotNull SortField<U>
$field(Field<U> newField)

Deprecated as a consequence of Field being deprecated.
Experimental query object model mutator method, see also QOM.
public @Nullable QOM.NullOrdering
$nullOrdering()

Experimental query object model accessor method, see also QOM.

public @NotNull SortField<T>
$nullOrdering(QOM.NullOrdering newOrdering)

Experimental query object model mutator method, see also QOM.

public @NotNull SortOrder
$sortOrder()

Experimental query object model accessor method, see also QOM.

public @NotNull SortField<T>
$sortOrder(SortOrder newOrder)

Experimental query object model mutator method, see also QOM.

public @NotNull String
getName()

The name of this sort field

public @NotNull SortOrder
getOrder()

Get the underlying sort order of this sort field

public @NotNull SortField<T>
nullsFirst()

Add a NULLS FIRST clause to this sort field

public @NotNull SortField<T>
nullsLast()

Add a NULLS LAST clause to this sort field

Method Detail

$fieldback to summary
public @NotNull Field<T> $field()

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Experimental query object model accessor method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
$fieldback to summary
public <U> @NotNull SortField<U> $field(Field<U> newField)

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Experimental query object model mutator method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
$nullOrderingback to summary
public @Nullable QOM.NullOrdering $nullOrdering()

Experimental query object model accessor method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@Nullable
$nullOrderingback to summary
public @NotNull SortField<T> $nullOrdering(QOM.NullOrdering newOrdering)

Experimental query object model mutator method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
$sortOrderback to summary
public @NotNull SortOrder $sortOrder()

Experimental query object model accessor method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
$sortOrderback to summary
public @NotNull SortField<T> $sortOrder(SortOrder newOrder)

Experimental query object model mutator method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
getNameback to summary
public @NotNull String getName()

The name of this sort field

Annotations
@NotNull
getOrderback to summary
public @NotNull SortOrder getOrder()

Get the underlying sort order of this sort field

Annotations
@NotNull
nullsFirstback to summary
public @NotNull SortField<T> nullsFirst()

Add a NULLS FIRST clause to this sort field

Annotations
@NotNull
@Support
nullsLastback to summary
public @NotNull SortField<T> nullsLast()

Add a NULLS LAST clause to this sort field

Annotations
@NotNull
@Support