类 ListPageContext

java.lang.Object
com.walker.db.page.ListPageContext

public abstract class ListPageContext extends Object
可对集合数据分页的上下文对象定义

它能提供对数据分页的支持,通常使用数据库分页,但也提供对其他方式的分页,如:文件数据。
这是对可分页内容的一种简单抽象,系统默认提供了对数据库的分页支持。
作者:
shikeying
  • 字段详细资料

    • PARAM_NAME_PAGE_INDEX

      public static final String PARAM_NAME_PAGE_INDEX
      当前页-参数名称
      另请参阅:
    • PARAM_NAME_PAGE_SIZE

      public static final String PARAM_NAME_PAGE_SIZE
      每页显示条数-参数名称
      另请参阅:
    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      另请参阅:
  • 构造器详细资料

    • ListPageContext

      public ListPageContext()
  • 方法详细资料

    • getCurrentPageIndex

      public static final int getCurrentPageIndex()
      从当前线程中返回当前页
      返回:
    • getCurrentPageSize

      public static final int getCurrentPageSize()
      从当前线程中返回[每页记录数]
      返回:
    • setCurrentPageIndex

      public static void setCurrentPageIndex(int pageIndex)
      保存当前页信息到线程中
      参数:
      pageIndex -
    • setCurrentPageSize

      public static void setCurrentPageSize(int pageSize)
      保存分页条数到线程中
      参数:
      pageSize -
    • clearCurrentPageIndex

      public static void clearCurrentPageIndex()
    • clearCurrentPageSize

      public static void clearCurrentPageSize()
    • getPageSearch

      public static final PageSearch getPageSearch()
    • setPageSearch

      public static final void setPageSearch(PageSearch pageSearch)
    • clearPageSearch

      public static final void clearPageSearch()
    • createGenericPager

      public static final <T> GenericPager<T> createGenericPager(List<T> datas, int pageIndex, int pageSize, int totalRows)
      返回带泛型的分页对象
      参数:
      datas - 业务数据,如:List data
      pageIndex - 页码值
      pageSize - 每页显示记录数
      totalRows - 总记录数
      返回:
    • createGenericPager

      public static final <T> GenericPager<T> createGenericPager(List<T> datas, int pageIndex, int totalRows)
      返回带泛型的分页对象
      参数:
      datas - 业务数据,如:List data
      pageIndex - 页码值
      totalRows - 总记录数
      返回:
    • createGenericPager

      public static final <T> GenericPager<T> createGenericPager(int pageIndex, int pageSize, int totalRows)
    • createEmptyGenericPager

      public static final <T> GenericPager<T> createEmptyGenericPager()
    • createMapPager

      public static final MapPager createMapPager(List<Map<String,Object>> datas, int pageIndex, int pageSize, int totalRows)
      创建分页对象,业务类型为Map<String, Object>
      参数:
      datas - 业务数据,如:List<Map<String, Object>> data
      pageIndex - 页码值
      pageSize - 每页显示记录数
      totalRows - 总记录数
      返回:
    • createMapPager

      public static final MapPager createMapPager(List<Map<String,Object>> datas, int pageIndex, int totalRows)
      创建分页对象,业务类型为Map<String, Object>
      参数:
      datas -
      pageIndex -
      totalRows -
      返回:
    • createPagerView

      public static final <T> PagerView<T> createPagerView(GenericPager<T> pager, String jsMethod)
      创建UI层可用的分页展示对象
      参数:
      pager -
      jsMethod -
      返回: