Annotation Interface PartitionSort


@Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface PartitionSort
Defines sorting behavior for partitioned fields or methods. This annotation allows specifying the position and sort order within a partition for annotated elements.

Apply this annotation to fields or methods to control their ordering when partitioned data is sorted. The position() specifies the sorting priority, and the order() determines whether the sorting is ascending or descending.

Retention: RUNTIME

This annotation is retained at runtime to enable runtime reflection.

Target: FIELD, METHOD

This annotation can be applied to fields or methods.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Specifies the sorting position for the annotated field or method.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the sorting order (ascending or descending) for the annotated field or method.
  • Element Details

    • position

      int position
      Specifies the sorting position for the annotated field or method. Fields or methods with lower positions are sorted before those with higher positions.
      Returns:
      an integer indicating the sorting position
    • order

      SortOrder order
      Specifies the sorting order (ascending or descending) for the annotated field or method. The default value is SortOrder.ASCENDING.
      Returns:
      the sorting order
      Default:
      ASCENDING