Class MappedPagedList<T,D>

java.lang.Object
io.ebeaninternal.server.querydefn.MappedPagedList<T,D>
All Implemented Interfaces:
io.ebean.PagedList<D>

public final class MappedPagedList<T,D> extends Object implements io.ebean.PagedList<D>
PagedList adapter backing query.mapTo(dtoType).findPagedList().

Delegates all page metadata (total count, page index, hasNext()/hasPrev(), ...) straight through to the underlying entity-typed PagedList unchanged - paging is a property of the query, not of the DTO shape. Only getList() differs: it maps the delegate's entity list to the target DTO list (once, cached) via the given DtoMapper.

  • Constructor Details

    • MappedPagedList

      public MappedPagedList(io.ebean.PagedList<T> delegate, io.ebean.DtoMapper<T,D> mapper)
  • Method Details

    • loadCount

      public void loadCount()
      Specified by:
      loadCount in interface io.ebean.PagedList<T>
    • getFutureCount

      public Future<Integer> getFutureCount()
      Specified by:
      getFutureCount in interface io.ebean.PagedList<T>
    • getList

      public List<D> getList()
      Specified by:
      getList in interface io.ebean.PagedList<T>
    • getTotalCount

      public int getTotalCount()
      Specified by:
      getTotalCount in interface io.ebean.PagedList<T>
    • getTotalPageCount

      public int getTotalPageCount()
      Specified by:
      getTotalPageCount in interface io.ebean.PagedList<T>
    • getPageSize

      public int getPageSize()
      Specified by:
      getPageSize in interface io.ebean.PagedList<T>
    • getPageIndex

      public int getPageIndex()
      Specified by:
      getPageIndex in interface io.ebean.PagedList<T>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface io.ebean.PagedList<T>
    • hasPrev

      public boolean hasPrev()
      Specified by:
      hasPrev in interface io.ebean.PagedList<T>
    • getDisplayXtoYofZ

      public String getDisplayXtoYofZ(String to, String of)
      Specified by:
      getDisplayXtoYofZ in interface io.ebean.PagedList<T>