ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.query.model
Enum Order

java.lang.Object
  extended by java.lang.Enum<Order>
      extended by org.modeshape.jcr.query.model.Order
All Implemented Interfaces:
Serializable, Comparable<Order>, Readable

public enum Order
extends Enum<Order>
implements Readable

An enumeration for the kind of Ordering.


Enum Constant Summary
ASCENDING
           
DESCENDING
           
 
Method Summary
static Order forSymbol(String symbol)
          Attempt to find the Order given a symbol.
 String getString()
          Get the string representation of this query object.
 String symbol()
          Get the symbolic representation of the order
 String toString()
           
static Order valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Order[] 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

ASCENDING

public static final Order ASCENDING

DESCENDING

public static final Order DESCENDING
Method Detail

values

public static Order[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Order c : Order.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Order valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

symbol

public String symbol()
Get the symbolic representation of the order

Returns:
the symbolic representation; never null

toString

public String toString()
Overrides:
toString in class Enum<Order>

forSymbol

public static Order forSymbol(String symbol)
Attempt to find the Order given a symbol. The matching is done independent of case.

Parameters:
symbol - the symbol
Returns:
the Order having the supplied symbol, or null if there is no Order with the supplied symbol
Throws:
IllegalArgumentException - if the symbol is null

getString

public String getString()
Description copied from interface: Readable
Get the string representation of this query object.

Specified by:
getString in interface Readable
Returns:
the string representation; never null

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.