Class PagingParam

java.lang.Object
com.emc.documentum.rest.http.parameter.PagingParam

public class PagingParam extends Object
A typed parameter group for the common pagination parameters used on the controller. It contains below parameters:
  • page
  • items-per-page
  • include-total
Below example shows how to use this parameter in controllers.
 
     @ResponseBody
     public ResponseEntity<GroupObject> getRepositories(
     @TypedParam final PagingParam pagingParam,
     @RequestUri final UriInfo uriInfo)  {
     }
  
 
  • Constructor Details

    • PagingParam

      public PagingParam()
      Default constructor
    • PagingParam

      public PagingParam(int page, int itemsPerPage, boolean includeTotal)
      Constructor
      Parameters:
      page - page number
      itemsPerPage - items number for each page
      includeTotal - include total or not
    • PagingParam

      public PagingParam(int page, int itemsPerPage)
      Constructor
      Parameters:
      page - page number
      itemsPerPage - items number for each page
    • PagingParam

      public PagingParam(boolean includeTotal)
      Constructor
      Parameters:
      includeTotal - include total or not
  • Method Details

    • getPage

      public int getPage()
      Get page number
      Returns:
      page number
    • setPage

      public void setPage(int page)
      Set page number
      Parameters:
      page - page number
    • getItemsPerPage

      public int getItemsPerPage()
      Get items number for each page
      Returns:
      items number per page
    • setItemsPerPage

      public void setItemsPerPage(int itemsPerPage)
      Set items page for each page
      Parameters:
      itemsPerPage - items number for each page
    • isIncludeTotal

      public boolean isIncludeTotal()
      Check if total number is included
      Returns:
      true if include total
    • setIncludeTotal

      public void setIncludeTotal(boolean includeTotal)
      Set include total
      Parameters:
      includeTotal - include total or not
    • setMaxPageSize

      public void setMaxPageSize(int maxPageSize)
      Set max page size for this instance
      Parameters:
      maxPageSize - the max size of a page