Package com.luna.common.page
Class Page<T>
java.lang.Object
com.luna.common.page.Page<T>
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
long
getLast()
List<?>
getList()
long
getLpage()
long
getNext()
long
getRpage()
long
getSize()
long
getStart()
long
getTotal()
long
getUpper()
上一页void
initPage
(long total, int currentpage, int pagesize) 初始化分页void
setCurrentpage
(long currentpage) void
setCurrentpage
(long currentpage, long total, long pagesize) void
setLast
(int last) 总共有多少页,即末页void
void
setLpage
(int lpage) void
setNext
(int next) void
setRpage
(int rpage) void
setSize
(int size) void
setStart
(long start) void
setTotal
(long total)
-
Field Details
-
offsize
public int offsize全局偏移量
-
-
Constructor Details
-
Page
public Page() -
Page
public Page(long total, int currentpage, int pagesize, int offsize) 带有偏移量设置的分页- Parameters:
currentpage
- 页码total
- 总计pagesize
- 每页多少个offsize
- 偏移量
-
Page
public Page(long total, int currentpage, int pagesize) - Parameters:
total
- 总记录数currentpage
- 当前页pagesize
- 每页显示多少条
-
-
Method Details
-
setCurrentpage
public void setCurrentpage(long currentpage, long total, long pagesize) - Parameters:
currentpage
- 页码total
- 总计pagesize
- 每页多少个
-
getUpper
public long getUpper()上一页- Returns:
-
initPage
public void initPage(long total, int currentpage, int pagesize) 初始化分页- Parameters:
currentpage
- 页码total
- 总计pagesize
- 每页多少个
-
getNext
public long getNext() -
setNext
public void setNext(int next) -
getCurrentpage
public long getCurrentpage() -
setCurrentpage
public void setCurrentpage(long currentpage) -
getTotal
public long getTotal() -
setTotal
public void setTotal(long total) -
getSize
public long getSize() -
setSize
public void setSize(int size) -
getLast
public long getLast() -
setLast
public void setLast(int last) 总共有多少页,即末页- Parameters:
last
-
-
getLpage
public long getLpage() -
setLpage
public void setLpage(int lpage) -
getRpage
public long getRpage() -
setRpage
public void setRpage(int rpage) -
getStart
public long getStart() -
setStart
public void setStart(long start) -
getList
- Returns:
- the list
-
setList
- Parameters:
list
- the list to set
-