Interface Limit

All Known Implementing Classes:
Limit.DefaultLimit

public interface Limit
The query limit.
Since:
4.13
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    The default implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Limit
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
     
    default int
     
    static Limit
    of(int maxResults, long offset)
    Creates a new limit.
    default long
     
  • Field Details

    • UNLIMITED

      static final Limit UNLIMITED
  • Method Details

    • maxResults

      default int maxResults()
      Returns:
      The max results of the query or -1 if none
    • offset

      default long offset()
      Returns:
      The offset of the query or 0 if none
    • isLimited

      default boolean isLimited()
      Returns:
      Is the limit present
    • of

      static Limit of(int maxResults, long offset)
      Creates a new limit.
      Parameters:
      maxResults - The max results
      offset - The offset
      Returns:
      the limit