org.appng.api.rest

## Class RestClient.Pageable

- java.lang.Object
- - org.appng.api.rest.RestClient.Pageable

- Enclosing class:
    RestClient

      public static class RestClient.Pageable
      extends Object

  Wraps paging and sorting

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Pageable(int page, int pageSize)` Creates a new pageable without any sorting
    `Pageable(int page, int pageSize, boolean reset)` Creates a new pageable without any sorting
    `Pageable(int page, int pageSize, String field, Sort.OrderEnum order)` Creates a new pageable
    `Pageable(int page, int pageSize, String field, Sort.OrderEnum order, boolean reset)` Creates a new pageable

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RestClient.Pageable` | `addSort(String field, Sort.OrderEnum direction)` Adds a sort criteria for the given field.
    `String` | `getSortQuery()` Creates a query string (matrix-parameter style) containing all the sort criteria

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

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

- - ### Constructor Detail

    - #### Pageable

          public Pageable(int page,
                          int pageSize)

      Creates a new pageable without any sorting
      Parameters:
        `page` - the zero-indexed page number
        `pageSize` - the size of a page

    - #### Pageable

          public Pageable(int page,
                          int pageSize,
                          boolean reset)

      Creates a new pageable without any sorting
      Parameters:
        `page` - the zero-indexed page number
        `pageSize` - the size of a page
        `reset` - set to `true` to reset current sort criteria

    - #### Pageable

          public Pageable(int page,
                          int pageSize,
                          String field,
                          Sort.OrderEnum order)

      Creates a new pageable
      Parameters:
        `page` - the zero-indexed page number
        `pageSize` - the size of a page
        `field` - the field to sort
        `order` - the direction to sort

    - #### Pageable

          public Pageable(int page,
                          int pageSize,
                          String field,
                          Sort.OrderEnum order,
                          boolean reset)

      Creates a new pageable
      Parameters:
        `page` - the zero-indexed page number
        `pageSize` - the size of a page
        `field` - the field to sort
        `order` - the direction to sort
        `reset` - set to `true` to reset current sort criteria

  - ### Method Detail

    - #### addSort

          public RestClient.Pageable addSort(String field,
                                             Sort.OrderEnum direction)

      Adds a sort criteria for the given field.
      Parameters:
        `field` - the field to sort
        `direction` - the direction to sort
      Returns:
        this `RestClient.Pageable`

    - #### getSortQuery

          public String getSortQuery()

      Creates a query string (matrix-parameter style) containing all the sort criteria
      Returns:
        the query string

Copyright © 2011–2023 aiticon GmbH. All rights reserved.