Interface LimitBuilder<X extends LimitBuilder<X>>

Type Parameters:
X - The concrete builder type
All Known Subinterfaces:
BaseCriteriaBuilder<T,X>, BaseCTECriteriaBuilder<X>, BaseFinalSetOperationBuilder<T,X>, BaseFromQueryBuilder<T,X>, BaseInsertCriteriaBuilder<T,X>, BaseOngoingFinalSetOperationBuilder<T,X>, BaseSubqueryBuilder<X>, CriteriaBuilder<T>, FinalSetOperationCriteriaBuilder<T>, FinalSetOperationCTECriteriaBuilder<T>, FinalSetOperationSubqueryBuilder<T>, FullSelectCTECriteriaBuilder<X>, InsertCriteriaBuilder<T>, LeafOngoingSetOperationCriteriaBuilder<X>, LeafOngoingSetOperationCTECriteriaBuilder<X>, LeafOngoingSetOperationSubqueryBuilder<X>, OngoingFinalSetOperationCriteriaBuilder<T>, OngoingFinalSetOperationCTECriteriaBuilder<T>, OngoingFinalSetOperationSubqueryBuilder<T>, OngoingSetOperationCriteriaBuilder<T,Y>, OngoingSetOperationCTECriteriaBuilder<T,Y>, OngoingSetOperationSubqueryBuilder<T,Y>, ReturningInsertCriteriaBuilder<T,X>, SelectBaseCTECriteriaBuilder<X>, SelectCTECriteriaBuilder<X>, SelectRecursiveCTECriteriaBuilder<X>, StartOngoingSetOperationCriteriaBuilder<X,Y>, StartOngoingSetOperationCTECriteriaBuilder<X,Y>, StartOngoingSetOperationSubqueryBuilder<X,Y>, SubqueryBuilder<T>

public interface LimitBuilder<X extends LimitBuilder<X>>
An interface for builders that support limit and offset. This is related to the fact, that a query builder supports the limit and offset clause.
Since:
1.1.0
Author:
Christian Beikov
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The position of the first result.
    int
    The maximum number of results to retrieve.
    setFirstResult(int firstResult)
    Set the position of the first result to retrieve.
    setMaxResults(int maxResults)
    Set the maximum number of results to retrieve.
  • Method Details

    • setFirstResult

      X setFirstResult(int firstResult)
      Set the position of the first result to retrieve.
      Parameters:
      firstResult - The position of the first result, numbered from 0
      Returns:
      This builder for chaining
    • setMaxResults

      X setMaxResults(int maxResults)
      Set the maximum number of results to retrieve.
      Parameters:
      maxResults - The maximum number of results to retrieve
      Returns:
      This builder for chaining
    • getFirstResult

      int getFirstResult()
      The position of the first result. Returns 0 if setFirstResult was not used.
      Returns:
      The position of the first result
    • getMaxResults

      int getMaxResults()
      The maximum number of results to retrieve. Returns Integer.MAX_VALUE if setMaxResults was not used.
      Returns:
      The maximum number of results