public class Paging extends Object
| Modifier and Type | Method and Description |
|---|---|
static Paging |
fromString(String value)
Create a paging object out of it string representation.
|
Page |
getCurrent()
The current page in this object.
|
Page |
getPage(int value)
Gets the page by the given value.
|
int |
getPageCount()
The number of pages in this paging object.
|
Page[] |
getPages()
An array with all the page of this paging object.
|
List<Page> |
getPagesAsList()
A list with all the page of this paging object.
|
int |
getPageSize()
The size in records for the pages of this paging object.
|
Page[] |
getPagesSection(int sectionSize)
Gets a section of the paging object.
|
List<Page> |
getPagesSectionAsList(int sectionSize)
Gets a section of the paging object.
|
int |
getRecordCount()
The number of records for the query.
|
boolean |
isFirst()
Determines if the current page is the first page of this object.
|
boolean |
isLast()
Determines if the current page is the last page of this object.
|
void |
next()
Move this object to the next page.
|
static Paging |
of(int count,
int size)
Creates a paging object out of the number of records and the size of the
pages.
|
static Paging |
of(int count,
int size,
int current)
Creates a paging object out of the number of records, the size of the
pages, and the current page.
|
void |
prev()
Move this object to the previous page.
|
void |
setCurrent(int current)
The current page in this object.
|
void |
setCurrent(Page current)
The current page in this object.
|
Limit |
toLimit()
Creates a new SQL Limit object out of this paging object.
|
String |
toString() |
public int getRecordCount()
public int getPageSize()
public Page[] getPages()
public Page[] getPagesSection(int sectionSize)
sectionSize - The size in pages of the section to get.public List<Page> getPagesAsList()
public List<Page> getPagesSectionAsList(int sectionSize)
sectionSize - The size in pages of the section to get.public int getPageCount()
public Page getCurrent()
public void setCurrent(Page current)
current - The current page in this object.public void setCurrent(int current)
current - The current page in this object.public void next()
public void prev()
public boolean isFirst()
public boolean isLast()
public Page getPage(int value)
value - The value of the page to look for.public static Paging of(int count, int size)
count - The number of records,size - The size of the pages.public static Paging of(int count, int size, int current)
count - The number of records,size - The size of the pages.current - The current page.public static Paging fromString(String value)
value - The string representation of the paging objectt.public Limit toLimit()
Copyright © 2015–2018 Bridje Framework. All rights reserved.