Class Page<E>
- java.lang.Object
-
- com.github.longdt.vertxorm.repository.Page<E>
-
- All Implemented Interfaces:
io.vertx.core.shareddata.Shareable
public class Page<E> extends Object implements io.vertx.core.shareddata.Shareable
Page class.
- Version:
- $Id: $Id
- Author:
- Long Dinh
-
-
Constructor Summary
Constructors Constructor Description Page(int currentPage, int pageSize, long totalElements, List<E> content)Constructor for Page.Page(PageRequest pageRequest, long totalElements, List<E> content)Constructor for Page.Page(io.vertx.core.json.JsonObject jsonObject)Constructor for Page.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<E>getContent()Getter for the fieldcontent.intgetCurrentPage()Getter for the fieldcurrentPage.intgetPageSize()Getter for the fieldpageSize.longgetTotalElements()Getter for the fieldtotalElements.longgetTotalPage()Getter for the fieldtotalPage.<R> Page<R>map(Function<E,R> mapFn)map.io.vertx.core.json.JsonObjecttoJson()toJson.
-
-
-
Constructor Detail
-
Page
public Page(PageRequest pageRequest, long totalElements, List<E> content)
Constructor for Page.
- Parameters:
pageRequest- aPageRequestobject.totalElements- a long.content- aListobject.
-
Page
public Page(int currentPage, int pageSize, long totalElements, List<E> content)Constructor for Page.
- Parameters:
currentPage- a int.pageSize- a int.totalElements- a long.content- aListobject.
-
Page
public Page(io.vertx.core.json.JsonObject jsonObject)
Constructor for Page.
- Parameters:
jsonObject- aJsonObjectobject.
-
-
Method Detail
-
toJson
public io.vertx.core.json.JsonObject toJson()
toJson.
- Returns:
- a
JsonObjectobject.
-
getCurrentPage
public int getCurrentPage()
Getter for the field
currentPage.- Returns:
- a int.
-
getPageSize
public int getPageSize()
Getter for the field
pageSize.- Returns:
- a int.
-
getTotalPage
public long getTotalPage()
Getter for the field
totalPage.- Returns:
- a long.
-
getTotalElements
public long getTotalElements()
Getter for the field
totalElements.- Returns:
- a long.
-
-