Class Query.SortPredicate (2.0.0)

public static final class Query.SortPredicate implements Serializable

SortPredicate is a data container that holds a single sort predicate.

Inheritance

java.lang.Object > Query.SortPredicate

Implements

Serializable

Constructors

SortPredicate(String propertyName, Query.SortDirection direction)

public SortPredicate(String propertyName, Query.SortDirection direction)
Parameters
NameDescription
propertyNameString
directionQuery.SortDirection

Methods

equals(@Nullable Object o)

public boolean equals(@Nullable Object o)
Parameter
NameDescription
o@org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
TypeDescription
boolean
Overrides

getDirection()

public Query.SortDirection getDirection()

Gets the direction of the sort.

Returns
TypeDescription
Query.SortDirection

getPropertyName()

public String getPropertyName()

Gets the name of the property to sort on.

Returns
TypeDescription
String

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

reverse()

public Query.SortPredicate reverse()

Returns a sort predicate with the direction reversed.

Returns
TypeDescription
Query.SortPredicate

toString()

public String toString()
Returns
TypeDescription
String
Overrides