public static enum ItemContext.SortDirection extends java.lang.Enum<ItemContext.SortDirection>
Enum Constant and Description |
---|
ASC
Items are sorted in ascending order.
|
DESC
Items are sorted in descending order.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
displayValue
The string value of this direction.
|
private int |
value
The integer value of this direction.
|
private static java.util.Map<java.lang.Integer,ItemContext.SortDirection> |
valueMapping
Maps an integer to a sort direction.
|
Modifier and Type | Method and Description |
---|---|
static ItemContext.SortDirection |
fromValue(int value)
Get the
SortDirection object when you know the integer code. |
abstract ItemContext.SortDirection |
getReverseDirection()
Get the reverse sort direction.
|
int |
getValue()
Get the integer value that is used when storing an location to the database.
|
abstract Order |
sortBy(Expression e)
Create an order expression that can be used with
queries:
Query.order(Order) . |
java.lang.String |
toString() |
static ItemContext.SortDirection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ItemContext.SortDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ItemContext.SortDirection ASC
public static final ItemContext.SortDirection DESC
private static final java.util.Map<java.lang.Integer,ItemContext.SortDirection> valueMapping
private final int value
private final java.lang.String displayValue
public static ItemContext.SortDirection[] values()
for (ItemContext.SortDirection c : ItemContext.SortDirection.values()) System.out.println(c);
public static ItemContext.SortDirection valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static ItemContext.SortDirection fromValue(int value)
SortDirection
object when you know the integer code.value
- The integer value.public abstract Order sortBy(Expression e)
Query.order(Order)
.e
- The expression to sort bypublic abstract ItemContext.SortDirection getReverseDirection()
public java.lang.String toString()
toString
in class java.lang.Enum<ItemContext.SortDirection>
public int getValue()