Package com.power4j.fist.data.domain
Class PageImpl<T>
java.lang.Object
com.power4j.fist.data.domain.PageImpl<T>
- Type Parameters:
T- 实体类型
- All Implemented Interfaces:
Paged<T>
- Since:
- 1.0
- Author:
- CJ (power4j@outlook.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription获取数据protected <U> List<U>getConvertedContent(Function<? super T, ? extends U> converter) int返回当前数据条数int返回当前页码int返回页大小getSort()返回请求使用的排序参数long总记录数int总页数boolean是否包含数据booleanhasNext()是否有下一页boolean是否有前一页booleanisFirst()是否为第一页booleanisLast()是否为最后一页<U> Paged<U>转换方法返回下一页的分页请求,使用方应该先检查是否存在下一页返回前一页的分页请求,使用方应该先检查是否存在前一页Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.power4j.fist.data.domain.Paged
getPageable, nextOrLastPageable
-
Field Details
-
FIRST_PAGE
protected static final int FIRST_PAGE- See Also:
-
-
Constructor Details
-
PageImpl
-
-
Method Details
-
getPageNumber
public int getPageNumber()Description copied from interface:Paged返回当前页码- Specified by:
getPageNumberin interfacePaged<T>- Returns:
- 返回当前页码
-
getPageSize
public int getPageSize()Description copied from interface:Paged返回页大小- Specified by:
getPageSizein interfacePaged<T>- Returns:
- 返回页大小
-
getNumberOfElements
public int getNumberOfElements()Description copied from interface:Paged返回当前数据条数- Specified by:
getNumberOfElementsin interfacePaged<T>- Returns:
- 返回当前数据条数
-
getTotalPages
public int getTotalPages()Description copied from interface:Paged总页数- Specified by:
getTotalPagesin interfacePaged<T>- Returns:
- 返回总页数
-
getTotalElements
public long getTotalElements()Description copied from interface:Paged总记录数- Specified by:
getTotalElementsin interfacePaged<T>- Returns:
- 返回总记录数
-
getContent
Description copied from interface:Paged获取数据- Specified by:
getContentin interfacePaged<T>- Returns:
- 返回数据
-
hasContent
public boolean hasContent()Description copied from interface:Paged是否包含数据- Specified by:
hasContentin interfacePaged<T>- Returns:
- boolean
-
getSort
Description copied from interface:Paged返回请求使用的排序参数 -
isFirst
public boolean isFirst()Description copied from interface:Paged是否为第一页 -
isLast
public boolean isLast()Description copied from interface:Paged是否为最后一页 -
hasNext
public boolean hasNext()Description copied from interface:Paged是否有下一页 -
hasPrevious
public boolean hasPrevious()Description copied from interface:Paged是否有前一页- Specified by:
hasPreviousin interfacePaged<T>- Returns:
- true 表示可以向前翻页
-
nextPageable
Description copied from interface:Paged返回下一页的分页请求,使用方应该先检查是否存在下一页- Specified by:
nextPageablein interfacePaged<T>- Returns:
- Pageable
- See Also:
-
previousPageable
Description copied from interface:Paged返回前一页的分页请求,使用方应该先检查是否存在前一页- Specified by:
previousPageablein interfacePaged<T>- Returns:
- Pageable
- See Also:
-
map
Description copied from interface:Paged转换方法 -
getConvertedContent
-