Class Page

java.lang.Object
overit.geocall.model.DynO
overit.geocall.model.Page
All Implemented Interfaces:
ConstraintValidator<DynO.Valid,DynO>, Serializable, overit.geocall.timezone.model.TimeZoned

public class Page extends DynO
Bean containing the paging information. This is usually used as a query param of a service to retrieve a specific page from a result's collection.
Since:
9.0
See Also:
GCApi:
dto
  • Constructor Details

    • Page

      public Page(@NotNull @NotNull Integer num, Integer size)
      Creates a new page indicating its number and the max number of the elements that can contains.
      Parameters:
      num - the page number.
      size - the max number of the elements that a page can contain.
    • Page

      public Page(@NotNull @NotNull PageSize pageSize, @NotNull @NotNull Integer num, Integer size)
      Represents a page with a specified size and number.
      Parameters:
      pageSize - The size of the page (S, M, or L).
      num - The number of the page.
      size - The maximum number of elements that the page can contain.
  • Method Details

    • getNumber

      public final int getNumber()
      Returns the page number or 0 if no value has been defined.
      Returns:
      the page number.
    • getSize

      public final int getSize()
      Returns the max number of the elements that a page can contain.
      Returns:
      the max number of the elements that a page can contain.
    • maxRows

      public final int maxRows()
      Gets the maximum number of rows to search. This value should be commonly passed to the CommandContext.setMaxRows(int) method.
      Returns:
      the maximum number of rows to search
    • skipRows

      public final int skipRows()
      Return the number of rows that must be skipped for the queries. This value should be commonly passed to the CommandContext.setSkipRows(int) method.
      Returns:
      the number of rows that must be skipped for the queries