com.bea.alcs.service.search.query
Enum SortBy

java.lang.Object
  extended by java.lang.Enum<SortBy>
      extended by com.bea.alcs.service.search.query.SortBy
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SortBy>

public enum SortBy
extends java.lang.Enum<SortBy>

Represents different types of sorts within a Product search.


Enum Constant Summary
FEATURED_ANYWHERE
          Sorts by feature-ness regardless of the category.
FEATURED_CATEGORY
          Sorts by feature-ness within a particular category and then by featured elsewhere.
PRICE
          Sorts by product price ascending (lower to higher).
PRODUCT_NAME
          Sorts by product name ascending (a to z).
RELEVANCE
          Sorts via highest match (relevance).
TOP_SELLER
          Sorts by the physical sales counts of products.
 
Method Summary
 java.lang.String getSortString()
          Returns the string representation of the sorting type.
static SortBy parseSortString(java.lang.String sortString)
          Attempts to parse a sorting string into a SortBy.
 java.lang.String toString()
          Returns the string representation of the sorting type.
static SortBy valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SortBy[] 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, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RELEVANCE

public static final SortBy RELEVANCE
Sorts via highest match (relevance).


PRODUCT_NAME

public static final SortBy PRODUCT_NAME
Sorts by product name ascending (a to z).


PRICE

public static final SortBy PRICE
Sorts by product price ascending (lower to higher).


TOP_SELLER

public static final SortBy TOP_SELLER
Sorts by the physical sales counts of products.


FEATURED_CATEGORY

public static final SortBy FEATURED_CATEGORY
Sorts by feature-ness within a particular category and then by featured elsewhere.


FEATURED_ANYWHERE

public static final SortBy FEATURED_ANYWHERE
Sorts by feature-ness regardless of the category.

Method Detail

values

public static final SortBy[] 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(SortBy c : SortBy.values())
        System.out.println(c);

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

valueOf

public static SortBy valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getSortString

public java.lang.String getSortString()
Returns the string representation of the sorting type.

Returns:
the string representation of the sorting type

toString

public java.lang.String toString()
Returns the string representation of the sorting type.

Overrides:
toString in class java.lang.Enum<SortBy>
Returns:
the string representation of the sorting type

parseSortString

public static SortBy parseSortString(java.lang.String sortString)
Attempts to parse a sorting string into a SortBy. Returns null if there are no sort type matches.

Parameters:
sortString - the sort string
Returns:
a SortBy representation of the string or null if there is none