Package net.dona.doip.client

# Class QueryParams

java.lang.Object
net.dona.doip.client.QueryParams

public class QueryParams extends Object
An object for holding query parameters for `DoipClient` search operations.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `QueryParams.Builder`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final QueryParams`
  `DEFAULT`
  Default query parameters.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QueryParams()`
  Construct default QueryParams, with pageSize = -1 (returns all results).
  `QueryParams(int pageNum, int pageSize)`
  Construct a QueryParams.
  `QueryParams(int pageNum, int pageSize, List<SortField> sortFields)`
  `QueryParams(int pageNum, int pageSize, List<SortField> sortFields, List<FacetSpecification> facets)`
  Construct a QueryParams.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static QueryParams.Builder`
  `builder()`
  `List<FacetSpecification>`
  `getFacets()`
  `int`
  `getPageNum()`
  `int`
  `getPageSize()`
  `List<SortField>`
  `getSortFields()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT

    public static final QueryParams DEFAULT
    Default query parameters. Passing `null` to search methods amounts to using this. No pagination and no sorting.

- ## Constructor Details

  - ### QueryParams

    public QueryParams()
    Construct default QueryParams, with pageSize = -1 (returns all results). Prefer `DEFAULT`.

  - ### QueryParams

    public QueryParams(int pageNum, int pageSize)
    Construct a QueryParams.
    Parameters:
      `pageNum` - the page number to return. Starts at 0. Ignored if pageSize <= 0.
      `pageSize` - the number of objects to return. PageSize of < 0 means return all.

  - ### QueryParams

    public QueryParams(int pageNum, int pageSize, List<SortField> sortFields)

  - ### QueryParams

    public QueryParams(int pageNum, int pageSize, List<SortField> sortFields, List<FacetSpecification> facets)
    Construct a QueryParams.
    Parameters:
      `pageNum` - the page number to return. Starts at 0. Ignored if pageSize <= 0.
      `pageSize` - the number of objects to return. PageSize of < 0 means return all.
      `sortFields` - how to sort the results
      `facets` - information about requested faceting When a user specifies a `facets` field in a search request (e.g., `"facets":[{"field":"/bucket"}]` in a JSON object in the body of a POST request), the Cordra indexer provides a `facets` field with an array of facets (e.g., `"facets":[...]`). Each facet contains a `field` field with an array of facets (e.g., `"facets":[...]`). Each facet contains a `field` field with a value `` (e.g., `"field":"/bucket"`). facets is a list of objects encapsulating each value (e.g., a list containing an object encapsulating "/bucket").

- ## Method Details

  - ### getPageNum

    public int getPageNum()

  - ### getPageSize

    public int getPageSize()

  - ### getSortFields

    public List<SortField> getSortFields()

  - ### getFacets

    public List<FacetSpecification> getFacets()

  - ### builder

    public static QueryParams.Builder builder()