|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface PageableDefault
Annotation to set defaults when injecting a Pageable
into a controller
method. Instead of configuring sort()
and direction()
you can also use SortDefault
or
SortDefault.SortDefaults
.
Optional Element Summary | |
---|---|
Sort.Direction |
direction
The direction to sort by. |
int |
page
The default-pagenumber the injected Pageable should get if no corresponding
parameter defined in request (default is 0). |
int |
size
The default-size the injected Pageable should get if no corresponding
parameter defined in request (default is 10). |
String[] |
sort
The properties to sort by by default. |
int |
value
Alias for size() . |
public abstract int value
size()
. Prefer to use the size()
method as it makes the annotation declaration more
expressive and you'll probably want to configure the page()
anyway.
public abstract int size
Pageable
should get if no corresponding
parameter defined in request (default is 10).
public abstract int page
Pageable
should get if no corresponding
parameter defined in request (default is 0).
public abstract String[] sort
public abstract Sort.Direction direction
Sort.Direction.ASC
.
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |