Class PageResponse<T>

  • All Implemented Interfaces:
    Serializable

    public class PageResponse<T>
    extends Response
    Response with batch page record to return, usually use in page query

    Created by xiaochu.lbj on 2020/06/30.

    See Also:
    Serialized Form
    • Constructor Detail

      • PageResponse

        public PageResponse()
    • Method Detail

      • getTotalCount

        public int getTotalCount()
      • setTotalCount

        public void setTotalCount​(int totalCount)
      • getPageSize

        public int getPageSize()
      • setPageSize

        public void setPageSize​(int pageSize)
      • getPageIndex

        public int getPageIndex()
      • setPageIndex

        public void setPageIndex​(int pageIndex)
      • getData

        public List<T> getData()
      • setData

        public void setData​(Collection<T> data)
      • getTotalPages

        public int getTotalPages()
      • isEmpty

        public boolean isEmpty()
      • isNotEmpty

        public boolean isNotEmpty()
      • of

        public static <T> PageResponse<T> of​(int pageSize,
                                             int pageIndex)
      • of

        public static <T> PageResponse<T> of​(Collection<T> data,
                                             int totalCount,
                                             int pageSize,
                                             int pageIndex)