Class QueryModifiers

java.lang.Object
com.querydsl.core.QueryModifiers
All Implemented Interfaces:
Serializable

public final class QueryModifiers extends Object implements Serializable
QueryModifiers combines limit and offset info into a single immutable value type.
Author:
tiwe
See Also:
  • Field Details

    • EMPTY

      public static final QueryModifiers EMPTY
      No limit and not offset restriction
  • Constructor Details

    • QueryModifiers

      public QueryModifiers(@Nullable @Nullable Long limit, @Nullable @Nullable Long offset)
    • QueryModifiers

      public QueryModifiers(QueryModifiers modifiers)
  • Method Details

    • limit

      public static QueryModifiers limit(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) long limit)
    • offset

      public static QueryModifiers offset(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) long offset)
    • getLimit

      @Nullable public @Nullable Long getLimit()
    • getLimitAsInteger

      @Nullable public @Nullable Integer getLimitAsInteger()
    • getOffset

      @Nullable public @Nullable Long getOffset()
    • getOffsetAsInteger

      @Nullable public @Nullable Integer getOffsetAsInteger()
    • isRestricting

      public boolean isRestricting()
      Checks if is restricting.
      Returns:
      true, if is restricting
    • subList

      public <T> List<T> subList(List<T> list)
      Get a sublist based on the restriction of limit and offset
      Type Parameters:
      T -
      Parameters:
      list - list to be handled
      Returns:
      sublist with limit and offset applied
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object