com.endeca.infront.navigation.model
Class SortOption

java.lang.Object
  extended by com.endeca.infront.navigation.model.SortOption

public class SortOption
extends Object

A specification of how a navigation results list should be sorted.


Constructor Summary
SortOption()
           
SortOption(String stringRepresentation)
          Constructor that supports a String representation.
 
Method Summary
 boolean equals(Object that)
          Equality check.
 String getLabel()
          The display name for this sorting option (optional).
 List<SortSpec> getSorts()
          The list of sort specifications.
 int hashCode()
           
 boolean isDefault()
          Returns whether or not this sort was applied as a default sort, or as a user-requested sort Used to control the application of Boost / Bury
 void setDefault(boolean isDefault)
           
 void setLabel(String label)
           
 void setSorts(List<SortSpec> sorts)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortOption

public SortOption()

SortOption

public SortOption(String stringRepresentation)
Constructor that supports a String representation. The input must be one or more sort keys (properties or dimensions), separated by "||". Optionally, each sort key may be followed by a suffix of "|1", indicating descending order, or "|0", indicating ascending order.

Parameters:
stringRepresentation - cannot be null
Method Detail

getLabel

public String getLabel()
The display name for this sorting option (optional).


setLabel

public void setLabel(String label)

getSorts

public List<SortSpec> getSorts()
The list of sort specifications.


setSorts

public void setSorts(List<SortSpec> sorts)
Parameters:
sorts - -- if this is null, will set an empty list for the value of sorts

isDefault

public boolean isDefault()
Returns whether or not this sort was applied as a default sort, or as a user-requested sort Used to control the application of Boost / Bury


setDefault

public void setDefault(boolean isDefault)

equals

public boolean equals(Object that)
Equality check. Supports unit testing.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.