Spring Data Commons

org.springframework.data.web
Annotation Type PageableDefaults


@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface PageableDefaults

Annotation to set defaults when injecting a Pageable into a controller method.

Author:
Oliver Gierke

Optional Element Summary
 int pageNumber
          The default-pagenumber the injected org.synyx.hades.domain.Pageable should get if no corresponding parameter defined in request (default is 0).
 String[] sort
          The properties to sort by by default.
 Sort.Direction sortDir
          The direction to sort by.
 int value
          The default-size the injected Pageable should get if no corresponding parameter defined in request (default is 10).
 

value

public abstract int value
The default-size the injected Pageable should get if no corresponding parameter defined in request (default is 10).

Default:
10

pageNumber

public abstract int pageNumber
The default-pagenumber the injected org.synyx.hades.domain.Pageable should get if no corresponding parameter defined in request (default is 0).

Default:
0

sort

public abstract String[] sort
The properties to sort by by default. If unset, no sorting will be applied at all.

Returns:
Default:
{}

sortDir

public abstract Sort.Direction sortDir
The direction to sort by. Defaults to {@link Direction#ASC.

Returns:
Default:
org.springframework.data.domain.Sort.Direction.ASC

Spring Data Commons

Copyright © 2013. All Rights Reserved.