Class RestClient.Pageable

  • Enclosing class:
    RestClient

    public static class RestClient.Pageable
    extends Object
    Wraps paging and sorting
    • 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

      • getSortQuery

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