Class PageRequest

java.lang.Object
io.gdcc.spi.export.PageRequest

public final class PageRequest extends Object
Defines pagination parameters for data retrieval methods that return potentially large collections of results.

Use unpaged() for requests that should return all results in a single batch.

  • Method Details

    • of

      public static PageRequest of(int offset, int limit)
      Creates a page request with the given offset and limit.
      Parameters:
      offset - zero-based index of the first result to return
      limit - maximum number of results to return
      Returns:
      a new PageRequest
    • unpaged

      public static PageRequest unpaged()
      Returns a request for all results (no pagination).
    • getOffset

      public int getOffset()
    • getLimit

      public int getLimit()
    • isPaged

      public boolean isPaged()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object