Package com.helixframework.db.repository
Interface MappingCursorQuerySpecification<R,C>
- Type Parameters:
R- the type of object to be mapped from the ResultSetC- the type of the cursor
- All Superinterfaces:
QuerySpecification<R>
The MappingCursorQuerySpecification interface represents a query specification used in cursor-based pagination.
It extends the QuerySpecification interface.
-
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.Retrieves theResultSetMapperassociated with this query specification.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 T
-
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
-
getMapper
ResultSetMapper<R> getMapper()Retrieves theResultSetMapperassociated with this query specification. Use theResultSetMapperto map aResultSetto an object or a list of objects.- Returns:
- the
ResultSetMapperassociated with this query specification
-