Annotation Type SortDefault
Annotation, heavily inspired by Spring Data's
SortDefault,
for configuring the Pageable sort default values to use when no query parameters are given.- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceWrapper annotation to allow declaring multipleSortDefaultannotations on a method parameter. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe sort direction to use forsortof aPageablewhen no sort direction is defined for a path.The null handling to use forsortof aPageablewhen no null handling is defined for a path.String[]The paths to use forsortof aPageablewhen no sort query parameter is defined.
-
Element Details
-
sort
String[] sortThe paths to use forsortof aPageablewhen no sort query parameter is defined.- Returns:
- The default paths to sort by
- Default:
- {}
-
direction
Sort.Direction directionThe sort direction to use forsortof aPageablewhen no sort direction is defined for a path. Defaults toSort.Direction.ASC.- Returns:
- The default direction to sort by
- Default:
- ASC
-
nulls
Sort.NullHandling nullsThe null handling to use forsortof aPageablewhen no null handling is defined for a path. Defaults toSort.NullHandling.NATIVE.- Returns:
- The default null handling to use for sorting
- Default:
- NATIVE
-