Annotation 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
Target: FIELD
, METHOD
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionint
Specifies the sorting position for the annotated field or method. -
Optional Element Summary
Optional Elements
-
Element Details
-
position
int positionSpecifies 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 orderSpecifies the sorting order (ascending or descending) for the annotated field or method. The default value isSortOrder.ASCENDING
.- Returns:
- the sorting order
- Default:
ASCENDING
-