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 SearchSortingBuilder
builder()
builder factory method for SearchSortingstatic SearchSortingBuilder
builder
(SearchSorting template) create builder for SearchSorting instancestatic SearchSorting
deepCopy
(SearchSorting template) factory method to create a deep copy of SearchSorting@NotNull String
getField()
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 SearchQueryExpression
Allows 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 SearchSortOrder
getOrder()
Specify the order in which the search results should be sorted.static SearchSorting
of()
factory methodstatic SearchSorting
of
(SearchSorting template) factory method to create a shallow copy SearchSortingvoid
Use any searchable field of the resource as sort criterion, or"score"
to sort by relevance score calculated by the API.void
setFieldType
(SearchFieldType fieldType) Provide the data type of the givenfield
.void
setFilter
(SearchQueryExpression filter) Allows you to apply a sort filter.void
setLanguage
(String language) String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47.void
setMode
(SearchSortMode mode) Specify the sort mode to be applied for a set-typefield
.void
setOrder
(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> T
withSearchSorting
(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
asc
for ascending, ordesc
for 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
asc
for ascending, ordesc
for 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
-
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
-