Package nbbrd.service

Annotation Type ServiceSorter


@Documented @Target(METHOD) @Retention(SOURCE) public @interface ServiceSorter
Specifies that a method must be used as a sorter on a service. This annotation must be used in conjunction with ServiceDefinition.

The annotated method must follow the following rules:

  1. Sorter method only applies to methods of a service
  2. Sorter method does not apply to static methods
  3. Sorter method must have no-args
  4. Sorter method must return double, int, long or comparable
  5. Sorter method must not throw checked exceptions
Author:
Philippe Charles
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Sets the sorter ordering in case of multiple sorters.
    boolean
    Applies a reverse sorting.
  • Element Details

    • reverse

      boolean reverse
      Applies a reverse sorting.
      Returns:
      true for reverse sorting, false otherwise
      Default:
      false
    • position

      int position
      Sets the sorter ordering in case of multiple sorters.
      Returns:
      an ordering
      Default:
      2147483647