public class QuerySort extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ORDER_ASC |
static int |
ORDER_DESC
Use these instead of the ones provided in the apache Solr package
in order to avoid introducing a dependency to that package in all modules
Values are public because they are read from SearchServiceImpl
|
| Constructor and Description |
|---|
QuerySort(String sortField)
Create a new query sort and order
|
QuerySort(String sortField,
int sortOrder)
Create a new query sort and order
|
QuerySort(String sortField,
String sortOrder)
Create a new query sort and order
|
| Modifier and Type | Method and Description |
|---|---|
String |
getSortField() |
int |
getSortOrder() |
static boolean |
isAscending(String sortOrder)
Checks if the specified sort order is ascending
|
static boolean |
isSortOrder(String s)
Checks if the provided (trimmed) string is a sort order specification
|
String |
toString() |
public static final int ORDER_DESC
public static final int ORDER_ASC
public QuerySort(String sortField, int sortOrder)
sortField - name of the sort fieldsortOrder - sort order, either ascending (1) or descending (0)public QuerySort(String sortField, String sortOrder)
sortField - name of the field used for sortingsortOrder - ascending or descending orderpublic QuerySort(String sortField)
sortField - name of the sort field with optionally ASC, ASCENDING, DESC or DESCENDING to specify sort orderpublic static boolean isSortOrder(String s)
s - stringpublic static boolean isAscending(String sortOrder)
sortOrder - stringpublic String getSortField()
public int getSortOrder()
Copyright © 2019 Europeana Foundation. All rights reserved.