|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ItemContext.SortDirection> net.sf.basedb.core.ItemContext.SortDirection
public static enum ItemContext.SortDirection
Enumeration used to specify the sort direction.
Enum Constant Summary | |
---|---|
ASC
Items are sorted in ascending order. |
|
DESC
Items are sorted in descending order. |
Field Summary | |
---|---|
private String |
displayValue
The string value of this direction. |
private int |
value
The integer value of this direction. |
private static Map<Integer,ItemContext.SortDirection> |
valueMapping
Maps an integer to a sort direction. |
Method Summary | |
---|---|
static ItemContext.SortDirection |
fromValue(int value)
Get the SortDirection object when you know the integer code. |
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) . |
String |
toString()
|
static ItemContext.SortDirection |
valueOf(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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ItemContext.SortDirection ASC
public static final ItemContext.SortDirection DESC
Field Detail |
---|
private static final Map<Integer,ItemContext.SortDirection> valueMapping
private final int value
private final String displayValue
Method Detail |
---|
public static ItemContext.SortDirection[] values()
for (ItemContext.SortDirection c : ItemContext.SortDirection.values()) System.out.println(c);
public static ItemContext.SortDirection valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
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 by
public String toString()
toString
in class Enum<ItemContext.SortDirection>
public int getValue()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |