Interface Page<T>

Type Parameters:
T - the type of elements in this page
All Superinterfaces:
Iterable<T>, Slice<T>, Streamable<T>
All Known Subinterfaces:
KeysetAwarePage<T>

public interface Page<T> extends Slice<T>

A page is a sublist of results. It provides information about its position relative to the entire list.

Repository methods that are declared to return Page or KeysetAwarePage must raise UnsupportedOperationException if the database is incapable of counting the total number of results across all pages, in which case a return type of Slice or KeysetAwareSlice should be used instead.

  • Method Details

    • totalElements

      long totalElements()
      Returns the total amount of elements.
      Returns:
      the total amount of elements.
    • totalPages

      long totalPages()
      Returns the total number of pages.
      Returns:
      the total number of pages.