Record Class CursorPagination.Field<TT>
java.lang.Object
java.lang.Record
com.flowlogix.jeedao.primefaces.CursorPagination.Field<TT>
- Record Components:
fieldName- supplies the name of the column, used to match against requested sort fields from the clientfieldMethod- a function that extracts the comparable value from the entity for that field, used for caching cursor state and constructing predicates
- All Implemented Interfaces:
Serializable
- Enclosing interface:
CursorPagination<TT>
public static record CursorPagination.Field<TT>(Lazy.SerializableSupplier<String> fieldName, FunctionalInterfaces.SerializableFunction<TT, Comparable<?>> fieldMethod)
extends Record
implements Serializable
Used to configure columns for cursor pagination.
First column is always used by default if no sort order is specified by the client,
so it is recommended to put the most stable and unique column first (e.g. id or createdDate).
Any fields specified should be indexed, so cursor pagination can be most efficient.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionField(Lazy.SerializableSupplier<String> fieldName, FunctionalInterfaces.SerializableFunction<TT, Comparable<?>> fieldMethod) Creates an instance of aFieldrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldMethodrecord component.Returns the value of thefieldNamerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Field
public Field(Lazy.SerializableSupplier<String> fieldName, FunctionalInterfaces.SerializableFunction<TT, Comparable<?>> fieldMethod) Creates an instance of aFieldrecord class.- Parameters:
fieldName- the value for thefieldNamerecord componentfieldMethod- the value for thefieldMethodrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
fieldName
-
fieldMethod
Returns the value of thefieldMethodrecord component.- Returns:
- the value of the
fieldMethodrecord component
-