Interface MappingCursorQuerySpecification<R,C>

Type Parameters:
R - the type of object to be mapped from the ResultSet
C - the type of the cursor
All Superinterfaces:
QuerySpecification<R>

public interface MappingCursorQuerySpecification<R,C> extends QuerySpecification<R>
The MappingCursorQuerySpecification interface represents a query specification used in cursor-based pagination. It extends the QuerySpecification interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Represents the default limit for query specifications used in cursor-based pagination.
    static final com.helixframework.pagination.sort.SortOrder
    Represents the default sort order for a query specification used in cursor-based pagination.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the cursor for the query specification.
    default int
    Retrieves the limit for the query specification used in cursor-based pagination.
    Retrieves the ResultSetMapper associated with this query specification.
    default com.helixframework.pagination.sort.SortOrder
    Returns 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_LIMIT
      Represents 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_ORDER
      Represents 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 SortOrder enumeration
    • getMapper

      ResultSetMapper<R> getMapper()
      Retrieves the ResultSetMapper associated with this query specification. Use the ResultSetMapper to map a ResultSet to an object or a list of objects.
      Returns:
      the ResultSetMapper associated with this query specification