Package com.dzidzi.dto.pagination
Class DzidziPaginationDTO<T>
java.lang.Object
com.dzidzi.dto.pagination.DzidziPaginationDTO<T>
- Type Parameters:
T- the entity
- All Implemented Interfaces:
Serializable
DzidziPaginationDTO is used to divide a large list of dataset into smaller pages. Each page contains a subset of the total dataset based on the limit. Using this interface helps users to navigate form one page to the other, that is next pages, previous pages, last page or first page.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DzidziPaginationDTO.Builder<T> builder()protected booleanbooleanintgetLimit()The limit is used to get a specific amount or subset of a dataset.intThe offset.intgetPage()The page number.The returns the datasets retrieved from the database.longThe total count of the given filter.longThis returns the total pages of the dataset expected to return by the query.inthashCode()toString()
-
Method Details
-
builder
-
getPage
public int getPage()The page number. -
getOffset
public int getOffset()The offset. -
getLimit
public int getLimit()The limit is used to get a specific amount or subset of a dataset. This is the page. -
getTotalCount
public long getTotalCount()The total count of the given filter. -
getTotalPages
public long getTotalPages()This returns the total pages of the dataset expected to return by the query. -
getResults
The returns the datasets retrieved from the database. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-