类 PageResult<T>

java.lang.Object
com.infilake.openapi.bidding.model.base.PageResult<T>
类型参数:
T - The type of records in the page

public class PageResult<T> extends Object
Paginated response wrapper Used for API endpoints that return paginated data:
 {
   "records": [...],
   "total": 100,
   "size": 10,
   "current": 1
 }
 
  • 构造器详细资料

    • PageResult

      public PageResult()
      Default constructor
    • PageResult

      public PageResult(List<T> records, long total, int size, int current)
      Constructor with all fields
      参数:
      records - List of records
      total - Total record count
      size - Page size
      current - Current page number
  • 方法详细资料

    • isFirstPage

      public boolean isFirstPage()
      Check if this is the first page
      返回:
      true if current page is 1
    • isLastPage

      public boolean isLastPage()
      Check if this is the last page
      返回:
      true if this is the last page
    • getTotalPages

      public int getTotalPages()
      Get total number of pages
      返回:
      Total pages
    • hasNext

      public boolean hasNext()
      Check if there are more pages
      返回:
      true if there are more pages after current
    • hasPrevious

      public boolean hasPrevious()
      Check if there are previous pages
      返回:
      true if there are pages before current
    • getRecords

      public List<T> getRecords()
      Get the list of records
      返回:
      List of records
    • setRecords

      public void setRecords(List<T> records)
      Set the list of records
      参数:
      records - List of records
    • getTotal

      public long getTotal()
      Get total record count
      返回:
      Total records
    • setTotal

      public void setTotal(long total)
      Set total record count
      参数:
      total - Total records
    • getSize

      public int getSize()
      Get page size
      返回:
      Page size
    • setSize

      public void setSize(int size)
      Set page size
      参数:
      size - Page size
    • getCurrent

      public int getCurrent()
      Get current page number
      返回:
      Current page
    • setCurrent

      public void setCurrent(int current)
      Set current page number
      参数:
      current - Current page
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object