Package com.helixframework.db.repository
Interface CursorQuerySpecification<T,C>
- Type Parameters:
T- the type of the entityC- the type of the cursor
- All Superinterfaces:
QuerySpecification<T>
Represents a query specification for cursor-based pagination.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRepresents the default limit for query specifications used in cursor-based pagination.static final com.helixframework.pagination.sort.SortOrderRepresents the default sort order for a query specification used in cursor-based pagination. -
Method Summary
Modifier and TypeMethodDescriptionGets the cursor for the query specification.default intgetLimit()Retrieves the limit for the query specification used in cursor-based pagination.default com.helixframework.pagination.sort.SortOrderReturns the sort order for the query specification used in cursor-based pagination.Methods inherited from interface com.helixframework.db.repository.QuerySpecification
execute, getName, getTxId
-
Field Details
-
DEFAULT_LIMIT
static final int DEFAULT_LIMITRepresents the default limit for query specifications used in cursor-based pagination. The DEFAULT_LIMIT variable is used to set the default number of records to be returned in a query. The initial value of DEFAULT_LIMIT is 25.- See Also:
-
DEFAULT_SORT_ORDER
static final com.helixframework.pagination.sort.SortOrder DEFAULT_SORT_ORDERRepresents the default sort order for a query specification used in cursor-based pagination. The DEFAULT_SORT_ORDER variable is used to set the default sort order for the query. The initial value of DEFAULT_SORT_ORDER is SortOrder.ASCENDING.
-
-
Method Details
-
getCursor
C getCursor()Gets the cursor for the query specification.- Returns:
- the cursor of type C
-
getLimit
default int getLimit()Retrieves the limit for the query specification used in cursor-based pagination. The limit determines the number of records to be returned in a query.- Returns:
- the integer value of the limit, which is initially set to DEFAULT_LIMIT (25)
-
getSortOrder
default com.helixframework.pagination.sort.SortOrder getSortOrder()Returns the sort order for the query specification used in cursor-based pagination.- Returns:
- the sort order specified by the
SortOrderenumeration
-