|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.regain.search.results.SortingOption
public class SortingOption
Holds the sorting for the current search request.
Field Summary | |
---|---|
private String |
description
|
static String |
FILENAME
|
private int |
id
|
static String |
LAST_MODIFIED
|
static String |
MIMETYPE
|
static String |
PATH
|
static String |
RELEVANCE
|
private boolean |
reverse
|
static String |
SIZE
|
private String |
sortFieldName
|
private int |
sortType
|
static String |
TITLE
|
Constructor Summary | |
---|---|
SortingOption(String orderFromRequest)
Creates the class from a given sorting option. |
|
SortingOption(String description,
String field,
String order,
int id)
Creates the instance from given config entries. |
Method Summary | |
---|---|
int |
compareTo(Object sortingOption)
Sort this option against another option. |
boolean |
equals(Object object)
Equal if same id. |
String |
getDescription()
|
String |
getFieldNameAndOrder()
|
int |
getId()
|
org.apache.lucene.search.SortField |
getSortField()
|
String |
getSortFieldName()
|
int |
getSortType()
|
int |
hashCode()
|
boolean |
isReverse()
|
private boolean |
isReverse(String option)
|
private void |
setRelevance()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static String RELEVANCE
public static String FILENAME
public static String SIZE
public static String MIMETYPE
public static String LAST_MODIFIED
public static String TITLE
public static String PATH
private String sortFieldName
private boolean reverse
private int sortType
private String description
private int id
Constructor Detail |
---|
public SortingOption(String orderFromRequest)
orderFromRequest
- the order String from the request. The orderFromRequest
is build from the field and the sorting direction e.g. size_desc.public SortingOption(String description, String field, String order, int id) throws RegainException
description
- the description shown in the dropdown boxfield
- the field name for sortingorder
- asc|desc indicates the sorting directionid
- the position in the dropdown list
RegainException
Method Detail |
---|
private boolean isReverse(String option)
private void setRelevance()
public String getSortFieldName()
public String getFieldNameAndOrder()
public boolean isReverse()
public int getSortType()
public org.apache.lucene.search.SortField getSortField()
public String getDescription()
public int getId()
public int compareTo(Object sortingOption) throws ClassCastException
compareTo
in interface Comparable
sortingOption
-
ClassCastException
public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |