Record Class PaginateEntry
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.PaginateEntry
- Record Components:
logicalName- the pagination role ("limit","offset","page", or"pagesize"); must not be blankparamName- the actual URL query-parameter name sent in the request; must not be blankdefaultValue- the value used when the query contains noLIMIT/OFFSETnode; absent means the parameter is omitted
public record PaginateEntry(String logicalName, String paramName, Optional<Long> defaultValue)
extends Record
Maps a logical pagination concept to a URL query parameter.
Recognised logical names and their typical uses:
"limit"— maximum number of rows per page."offset"— zero-based row offset (for offset-based APIs)."page"— one-based page number (for page-based APIs)."pagesize"— rows per page (for page-based APIs).
Syntax: limit: query("limit") [default: 100]
-
Constructor Summary
ConstructorsConstructorDescriptionPaginateEntry(String logicalName, String paramName, Optional<Long> defaultValue) Creates an instance of aPaginateEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelogicalNamerecord component.Returns the value of theparamNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PaginateEntry
Creates an instance of aPaginateEntryrecord class.- Parameters:
logicalName- the value for thelogicalNamerecord componentparamName- the value for theparamNamerecord componentdefaultValue- the value for thedefaultValuerecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
logicalName
Returns the value of thelogicalNamerecord component.- Returns:
- the value of the
logicalNamerecord component
-
paramName
Returns the value of theparamNamerecord component.- Returns:
- the value of the
paramNamerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-