Annotation Type Limit


@Target({METHOD,PARAMETER,FIELD})
@Retention(RUNTIME)
public @interface Limit
Limits the amount of elements to fetch for the annotated attribute.
Since:
1.5.0
Author:
Christian Beikov
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    String limit
    The maximum amount of elements to fetch for the annotated attribute.
    String[] order
    The order to use for the elements for the limit.
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    String offset
    The amount of elements to skip for the annotated attribute.
  • Element Details

    • limit

      String limit
      The maximum amount of elements to fetch for the annotated attribute. Can be an integer literal e.g. 5 or a parameter expression :myParam.
      Returns:
      The limit
    • order

      String[] order
      The order to use for the elements for the limit. This will not necessarily order the elements in a collection! The syntax is like for a JPQL.next order by item i.e. something like age DESC NULLS LAST. Paths that are not fully qualified i.e. relative paths that use no root alias, are prefixed with the mapping result.
      Returns:
      order to use for the limit
    • offset

      String offset
      The amount of elements to skip for the annotated attribute. Can be an integer literal e.g. 5 or a parameter expression :myParam.
      Returns:
      The offset
      Default:
      ""