| Constructor and Description |
|---|
Pager()
No-args constructor.
|
Pager(int limit)
Default constructor with limit.
|
Pager(long page,
int limit)
Default constructor with a page and count.
|
Pager(long page,
String sortby,
boolean desc,
int limit)
Default constructor with a page, count, sortby, desc and limit.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
The total number of results for a query.
|
String |
getLastKey()
Returns the last key from last page.
|
int |
getLimit()
Limits the maximum number of results to return in one page.
|
String |
getName()
Name of this pager object (optional).
|
long |
getPage()
Page number.
|
String |
getSortby()
The name of the field used when sorting the results.
|
boolean |
isDesc()
The sort order.
|
void |
setCount(long count)
Set the value of count.
|
void |
setDesc(boolean desc)
Sets the value of desc.
|
void |
setLastKey(String lastKey)
Sets the last key from last page.
|
void |
setLimit(int limit)
Set the value of limit.
|
void |
setName(String name)
Set the value of name.
|
void |
setPage(long page)
Set the value of page.
|
void |
setSortby(String sortby)
Sets the value of sortby.
|
String |
toString() |
public Pager()
public Pager(int limit)
limit - the results limitpublic Pager(long page,
int limit)
page - the page numberlimit - the results limitpublic Pager(long page,
String sortby,
boolean desc,
int limit)
page - the page numbersortby - name of property to sort bydesc - sort orderlimit - the results limitpublic String getLastKey()
public void setLastKey(String lastKey)
lastKey - last idpublic String getName()
public void setName(String name)
name - the name (optional)public String getSortby()
public void setSortby(String sortby)
sortby - the sort fieldpublic boolean isDesc()
public void setDesc(boolean desc)
desc - true if descending orderpublic int getLimit()
public void setLimit(int limit)
limit - the max number of results in one pagepublic long getCount()
public void setCount(long count)
count - total countpublic long getPage()
public void setPage(long page)
page - the page numberCopyright © 2018 Erudika. All rights reserved.