public class Page<E> extends ArrayList<E> implements Closeable
| Modifier and Type | Class and Description |
|---|---|
static interface |
Page.Function<E,T>
兼容低版本 Java 7
|
modCount| Constructor and Description |
|---|
Page() |
Page(int[] rowBounds,
boolean count) |
Page(int pageNo,
int pageSize) |
Page(int pageNo,
int pageSize,
boolean count) |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAllfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCodeparallelStream, streampublic Page()
public Page(int pageNo,
int pageSize)
public Page(int pageNo,
int pageSize,
boolean count)
public Page(int[] rowBounds,
boolean count)
rowBounds - 分页对象count - 总数public int getPages()
public long getEndRow()
public int getPageNo()
public int getPageSize()
public long getStartRow()
public long getTotal()
public void setTotal(long total)
public Boolean getReasonable()
public Boolean getPageSizeZero()
public String getOrderBy()
public boolean isOrderByOnly()
public void setOrderByOnly(boolean orderByOnly)
public boolean isCount()
public Page<E> reasonable(Boolean reasonable)
reasonable - 合理化public Page<E> pageSizeZero(Boolean pageSizeZero)
pageSizeZero - 分页大小public Page<E> boundSqlInterceptor(BoundSqlHandler boundSqlHandler)
boundSqlHandler - 分页拦截器public Page<E> countColumn(String columnName)
columnName - 列名public Paginating<E> toPageInfo()
public <T> Paginating<T> toPageInfo(Page.Function<E,T> function)
T - 泛型对象function - 函数public <T> Serialize<T> toPageSerializable(Page.Function<E,T> function)
T - 泛型对象function - 函数public <E> Paginating<E> doSelectPageInfo(Querying select)
public long doCount(Querying select)
public String getCountColumn()
public void setCountColumn(String countColumn)
public BoundSqlHandler getBoundSqlInterceptor()
public void setBoundSqlInterceptor(BoundSqlHandler boundSqlHandler)
public String getDialectClass()
public void setDialectClass(String dialectClass)
public Page<E> using(String dialect)
dialect - 分页实现类,可以使用 PageAutoDialect 类中注册的别名,例如 "mysql", "oracle"public String toString()
toString in class AbstractCollection<E>public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2021. All rights reserved.