org.compass.core
Enum CompassQuery.SortPropertyType

java.lang.Object
  extended by java.lang.Enum<CompassQuery.SortPropertyType>
      extended by org.compass.core.CompassQuery.SortPropertyType
All Implemented Interfaces:
Serializable, Comparable<CompassQuery.SortPropertyType>
Enclosing interface:
CompassQuery

public static enum CompassQuery.SortPropertyType
extends Enum<CompassQuery.SortPropertyType>

Used to define the type of the property that will be sorted. Note that INT has the lowest memorty requirements and STRING the most.

Author:
kimchy

Enum Constant Summary
AUTO
          Guess type of sort based on proeprty contents.
BYTE
          Sort using term values as encoded bytes.
DOUBLE
          Sort using term values as encoded Doubles.
FLOAT
          Sort using term values as encoded Floats.
INT
          Sort using term values as encoded Integers.
LONG
          Sort using term values as encoded Longs.
STRING
          Sort using term values as Strings.
 
Method Summary
static CompassQuery.SortPropertyType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CompassQuery.SortPropertyType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTO

public static final CompassQuery.SortPropertyType AUTO
Guess type of sort based on proeprty contents. A regular expression is used to look at the first term indexed for the proeprty and determine if it represents an integer number, a floating point number, or just arbitrary string characters.


STRING

public static final CompassQuery.SortPropertyType STRING
Sort using term values as Strings. Sort values are String and lower values are at the front.


BYTE

public static final CompassQuery.SortPropertyType BYTE
Sort using term values as encoded bytes. Sort values are bytes and lower values are at the front


INT

public static final CompassQuery.SortPropertyType INT
Sort using term values as encoded Integers. Sort values are Integer and lower values are at the front.


LONG

public static final CompassQuery.SortPropertyType LONG
Sort using term values as encoded Longs. Sort values are Long and lower values are at the front.


FLOAT

public static final CompassQuery.SortPropertyType FLOAT
Sort using term values as encoded Floats. Sort values are Float and lower values are at the front.


DOUBLE

public static final CompassQuery.SortPropertyType DOUBLE
Sort using term values as encoded Doubles. Sort values are Double and lower values are at the front.

Method Detail

values

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

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

valueOf

public static CompassQuery.SortPropertyType 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


Copyright (c) 2004-2009 The Compass Project.