Class PageableResult<E>

java.lang.Object
io.rocketbase.commons.dto.PageableResult<E>
All Implemented Interfaces:
Serializable, Iterable<E>

public class PageableResult<E> extends Object implements Iterable<E>, Serializable
wrapping object for paged result lists
See Also:
  • 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

      public static <E> PageableResult<E> page(org.springframework.data.domain.Page<E> page)
    • content

      public static <E> PageableResult<E> content(List<E> content)
    • iterator

      public Iterator<E> iterator()
      Specified by:
      iterator in interface Iterable<E>
    • hasNextPage

      public boolean hasNextPage()
    • hasPreviousPage

      public boolean hasPreviousPage()
    • toPage

      public org.springframework.data.domain.Page<E> toPage()
    • map

      public <U> PageableResult<U> map(Function<? super E,? extends U> converter)
      Returns a new PageableResult with the content of the current one mapped by the given Converter.
      Parameters:
      converter - must not be null.