public abstract class PageMethod extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEFAULT_COUNT |
protected static ThreadLocal<Page> |
LOCAL_PAGE |
Constructor and Description |
---|
PageMethod() |
Modifier and Type | Method and Description |
---|---|
static void |
clearPage()
移除本地变量
|
static long |
count(ISelect select)
获取任意查询方法的count总数
|
static <T> Page<T> |
getLocalPage()
获取 Page 参数
|
static <E> Page<E> |
offsetPage(int offset,
int limit)
开始分页
|
static <E> Page<E> |
offsetPage(int offset,
int limit,
boolean count)
开始分页
|
static void |
orderBy(String orderBy)
排序
|
protected static void |
setLocalPage(Page page)
设置 Page 参数
|
protected static void |
setStaticProperties(Properties properties)
设置参数
|
static <E> Page<E> |
startPage(int pageNum,
int pageSize)
开始分页
|
static <E> Page<E> |
startPage(int pageNum,
int pageSize,
boolean count)
开始分页
|
static <E> Page<E> |
startPage(int pageNum,
int pageSize,
boolean count,
Boolean reasonable,
Boolean pageSizeZero)
开始分页
|
static <E> Page<E> |
startPage(int pageNum,
int pageSize,
String orderBy)
开始分页
|
static <E> Page<E> |
startPage(Object params)
开始分页
|
protected static final ThreadLocal<Page> LOCAL_PAGE
protected static boolean DEFAULT_COUNT
protected static void setLocalPage(Page page)
page
- public static <T> Page<T> getLocalPage()
public static void clearPage()
public static long count(ISelect select)
select
- public static <E> Page<E> startPage(int pageNum, int pageSize)
pageNum
- 页码pageSize
- 每页显示数量public static <E> Page<E> startPage(int pageNum, int pageSize, boolean count)
pageNum
- 页码pageSize
- 每页显示数量count
- 是否进行count查询public static <E> Page<E> startPage(int pageNum, int pageSize, String orderBy)
pageNum
- 页码pageSize
- 每页显示数量orderBy
- 排序public static <E> Page<E> startPage(int pageNum, int pageSize, boolean count, Boolean reasonable, Boolean pageSizeZero)
pageNum
- 页码pageSize
- 每页显示数量count
- 是否进行count查询reasonable
- 分页合理化,null时用默认配置pageSizeZero
- true且pageSize=0时返回全部结果,false时分页,null时用默认配置public static <E> Page<E> offsetPage(int offset, int limit)
offset
- 起始位置,偏移位置limit
- 每页显示数量public static <E> Page<E> offsetPage(int offset, int limit, boolean count)
offset
- 起始位置,偏移位置limit
- 每页显示数量count
- 是否进行count查询public static void orderBy(String orderBy)
orderBy
- protected static void setStaticProperties(Properties properties)
properties
- 插件属性Copyright © 2018. All rights reserved.