Interface SearchSorting


public 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 Details

    • getField

      @NotNull @NotNull String 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

      @NotNull @NotNull SearchSortOrder getOrder()

      Specify the order in which the search results should be sorted. Can be asc for ascending, or desc 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

      @Valid @Valid SearchQueryExpression getFilter()

      Allows you to apply a sort filter.

      Returns:
      filter
    • setField

      void setField(String field)

      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

      void setLanguage(String language)

      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

      void setOrder(SearchSortOrder order)

      Specify the order in which the search results should be sorted. Can be asc for ascending, or desc for descending order.

      Parameters:
      order - value to be set
    • setMode

      void setMode(SearchSortMode mode)

      Specify the sort mode to be applied for a set-type field.

      Parameters:
      mode - value to be set
    • setFieldType

      void setFieldType(SearchFieldType fieldType)

      Provide the data type of the given field.

      Parameters:
      fieldType - value to be set
    • setFilter

      void setFilter(SearchQueryExpression filter)

      Allows you to apply a sort filter.

      Parameters:
      filter - value to be set
    • of

      static SearchSorting of()
      factory method
      Returns:
      instance of SearchSorting
    • of

      static SearchSorting of(SearchSorting template)
      factory method to create a shallow copy SearchSorting
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static SearchSorting deepCopy(@Nullable SearchSorting template)
      factory method to create a deep copy of SearchSorting
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static SearchSortingBuilder builder()
      builder factory method for SearchSorting
      Returns:
      builder
    • builder

      static SearchSortingBuilder builder(SearchSorting template)
      create builder for SearchSorting instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withSearchSorting

      default <T> T withSearchSorting(Function<SearchSorting,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<SearchSorting> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference