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,0or morelimit- the maximum number of rows to return,1or moresortOrders- 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 -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlimit()Returns the value of thelimitrecord component.intoffset()Returns the value of theoffsetrecord component.List<com.vaadin.flow.data.provider.QuerySortOrder> Returns the value of thesortOrdersrecord component.final StringtoString()Returns a string representation of this record class.
-
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,0or morelimit- the maximum number of rows to return,1or moresortOrders- the result columns to order by, ornullfor the query's own order- Throws:
IllegalArgumentException- if the offset is negative or the limit is not positive
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
sortOrders
Returns the value of thesortOrdersrecord component.- Returns:
- the value of the
sortOrdersrecord component
-