Interface SearchSorting
Sorting parameters provided with a Search request.
Example to create an instance using the builder pattern
SearchSorting searchSorting = SearchSorting.builder()
.field("{field}")
.order(SearchSortOrder.ASC)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic SearchSortingBuilderbuilder()builder factory method for SearchSortingstatic SearchSortingBuilderbuilder(SearchSorting template) create builder for SearchSorting instancecopyDeep()static SearchSortingdeepCopy(SearchSorting template) factory method to create a deep copy of SearchSorting@NotNull StringgetField()Use any searchable field of the resource as sort criterion, or"score"to sort by relevance score calculated by the API.Provide the data type of the givenfield.@Valid SearchQueryAllows you to apply a sort filter.String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47.getMode()Specify the sort mode to be applied for a set-typefield.@NotNull SearchSortOrdergetOrder()Specify the order in which the search results should be sorted.static SearchSortingof()factory methodstatic SearchSortingof(SearchSorting template) factory method to create a shallow copy SearchSortingvoidUse any searchable field of the resource as sort criterion, or"score"to sort by relevance score calculated by the API.voidsetFieldType(SearchFieldType fieldType) Provide the data type of the givenfield.voidsetFilter(SearchQuery filter) Allows you to apply a sort filter.voidsetLanguage(String language) String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47.voidsetMode(SearchSortMode mode) Specify the sort mode to be applied for a set-typefield.voidsetOrder(SearchSortOrder order) Specify the order in which the search results should be sorted.static com.fasterxml.jackson.core.type.TypeReference<SearchSorting>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithSearchSorting(Function<SearchSorting, T> helper) accessor map function
-
Method Details
-
getField
Use any searchable field of the resource as sort criterion, or
"score"to sort by relevance score calculated by the API.- Returns:
- field
-
getLanguage
String getLanguage()String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example:
en,en-US,zh-Hans-SG.- Returns:
- language
-
getOrder
Specify the order in which the search results should be sorted. Can be
ascfor ascending, ordescfor descending order.- Returns:
- order
-
getMode
SearchSortMode getMode()Specify the sort mode to be applied for a set-type
field.- Returns:
- mode
-
getFieldType
SearchFieldType getFieldType()Provide the data type of the given
field.- Returns:
- fieldType
-
getFilter
Allows you to apply a sort filter.
- Returns:
- filter
-
setField
Use any searchable field of the resource as sort criterion, or
"score"to sort by relevance score calculated by the API.- Parameters:
field- value to be set
-
setLanguage
String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example:
en,en-US,zh-Hans-SG.- Parameters:
language- value to be set
-
setOrder
Specify the order in which the search results should be sorted. Can be
ascfor ascending, ordescfor descending order.- Parameters:
order- value to be set
-
setMode
Specify the sort mode to be applied for a set-type
field.- Parameters:
mode- value to be set
-
setFieldType
Provide the data type of the given
field.- Parameters:
fieldType- value to be set
-
setFilter
Allows you to apply a sort filter.
- Parameters:
filter- value to be set
-
of
factory method- Returns:
- instance of SearchSorting
-
of
factory method to create a shallow copy SearchSorting- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
SearchSorting copyDeep() -
deepCopy
factory method to create a deep copy of SearchSorting- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for SearchSorting- Returns:
- builder
-
builder
create builder for SearchSorting instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withSearchSorting
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-