public class SortSpecification extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SortSpecification.SortEntry
A SortSPecification Entry.
|
static class |
SortSpecification.Type
Specifies the type of the terms to be sorted, or special types such as
CUSTOM
|
Modifier and Type | Field and Description |
---|---|
static SortSpecification.SortEntry |
INDEX_ORDER
Sort by indexing order (first indexed resource is first, etc.).
|
static SortSpecification.SortEntry |
RELEVANCE
Sort by Lucene document score.
|
Constructor and Description |
---|
SortSpecification()
Creates a new SortSpecification.
|
Modifier and Type | Method and Description |
---|---|
void |
add(SortSpecification.SortEntry entry)
Add a SortEntry.
|
void |
add(VirtualProperty property,
SortSpecification.Type type)
Add a property to sort on.
|
void |
add(VirtualProperty property,
SortSpecification.Type type,
boolean reverse)
Add a property to sort on.
|
void |
clear()
Clear the sort specification.
|
void |
remove(SortSpecification.SortEntry entry)
Remove a SortEntry.
|
void |
remove(VirtualProperty property,
SortSpecification.Type type)
Remove the property with specified type.
|
void |
remove(VirtualProperty property,
SortSpecification.Type type,
boolean reverse)
Remove the property with specified type.
|
int |
size()
Returns the number of added entries.
|
public static final SortSpecification.SortEntry INDEX_ORDER
public static final SortSpecification.SortEntry RELEVANCE
public void add(VirtualProperty property, SortSpecification.Type type)
property
- the propertytype
- the typepublic void add(VirtualProperty property, SortSpecification.Type type, boolean reverse)
property
- the propertytype
- the typereverse
- whether to sort in reverse.public void add(SortSpecification.SortEntry entry)
public void remove(VirtualProperty property, SortSpecification.Type type)
property
- the property.type
- the type.public void remove(VirtualProperty property, SortSpecification.Type type, boolean reverse)
property
- the property.type
- the type.reverse
- whether the sort is specified in reverse.public void remove(SortSpecification.SortEntry entry)
public void clear()
public int size()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.