Record Class QueryPage

java.lang.Object
java.lang.Record
com.vaadin.flow.component.ai.common.QueryPage
Record Components:
offset - the index of the first row to return, 0 or more
limit - the maximum number of rows to return, 1 or more
sortOrders - the result columns to order by, applied in list order; an empty list keeps the query's own order
All Implemented Interfaces:
Serializable

public record QueryPage(int offset, int limit, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders) extends Record implements Serializable
The page of a query's result that a lazily loading component asks a DatabaseProvider for: the rows from offset, at most limit of them, in the order of sortOrders.

A sort order names a result column the way the rows returned by the provider name it; a grid sorts by the column the user clicked, whose key is that name. An empty list of sort orders keeps the order the query itself produces.

Since:
25.4
Author:
Vaadin Ltd
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    QueryPage(int offset, int limit, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders)
    Creates a page.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the limit record component.
    int
    Returns the value of the offset record component.
    List<com.vaadin.flow.data.provider.QuerySortOrder>
    Returns the value of the sortOrders record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • QueryPage

      public QueryPage(int offset, int limit, List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders)
      Creates a page.
      Parameters:
      offset - the index of the first row to return, 0 or more
      limit - the maximum number of rows to return, 1 or more
      sortOrders - the result columns to order by, or null for the query's own order
      Throws:
      IllegalArgumentException - if the offset is negative or the limit is not positive
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • offset

      public int offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • limit

      public int limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • sortOrders

      public List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders()
      Returns the value of the sortOrders record component.
      Returns:
      the value of the sortOrders record component