Package io.rocketbase.commons.dto
Class PageableResult<E>
java.lang.Object
io.rocketbase.commons.dto.PageableResult<E>
- All Implemented Interfaces:
Serializable,Iterable<E>
wrapping object for paged result lists
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> PageableResult<E>static <T,E> PageableResult<E> contentPage(List<E> content, org.springframework.data.domain.Page<T> page) booleanbooleaniterator()<U> PageableResult<U>Returns a newPageableResultwith the content of the current one mapped by the givenConverter.static <E> PageableResult<E>page(org.springframework.data.domain.Page<E> page) static <T,E> PageableResult<E> org.springframework.data.domain.Page<E>toPage()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PageableResult
public PageableResult()
-
-
Method Details
-
contentPage
public static <T,E> PageableResult<E> contentPage(List<E> content, org.springframework.data.domain.Page<T> page) -
page
public static <T,E> PageableResult<E> page(org.springframework.data.domain.Page<T> page, Function<T, E> converter) -
page
-
content
-
iterator
-
hasNextPage
public boolean hasNextPage() -
hasPreviousPage
public boolean hasPreviousPage() -
toPage
-
map
Returns a newPageableResultwith the content of the current one mapped by the givenConverter.- Parameters:
converter- must not be null.
-