Spring Data MongoDB - Spring Web Services - Parent - SpringSource
Spring Data MongoDB - Spring Web Services - Parent - SpringSource Spring Data MongoDB - Spring Web Services - Parent - SpringSource
please define productname in your docbook file!The PageableArgumentResolver automatically resolves request parameters to build aPageRequest instance. By default it expects the following structure for the request parameters.Table 4.2. Request parameters evaluated by PageableArgumentResolverpagepage.sizepage.sortpage.sort.dirPage you want to retrieve.Size of the page you want to retrieve.Property that should be sorted by.Direction that should be used for sorting.In case you need multiple Pageables to be resolved from the request (for multiple tables, for example)you can use Spring's @Qualifier annotation to distinguish one from another. The request parametersthen have to be prefixed with ${qualifier}_. So for a method signature like this:public String showUsers(Model model,@Qualifier("foo") Pageable first,@Qualifier("bar") Pageable second) { … }you have to populate foo_page and bar_page and the related subproperties.Configuring a global default on bean declarationThe PageableArgumentResolver will use a PageRequest with the first page and a page size of 10by default. It will use that value if it cannot resolve a PageRequest from the request (because of missingparameters, for example). You can configure a global default on the bean declaration directly. If youmight need controller method specific defaults for the Pageable, annotate the method parameter with@PageableDefaults and specify page (through pageNumber), page size (through value), sort (listof properties to sort by), and sortDir (the direction to sort by) as annotation attributes:public String showUsers(Model model,@PageableDefaults(pageNumber = 0, value = 30) Pageable pageable) { … }1.4.0.BUILD-SNAPSHOTSpring Data MongoDB -Reference Documentation 23
Part II. Reference DocumentationDocument StructureThis part of the reference documentation explains the core functionality offered by Spring DataDocument.Chapter 5, MongoDB support introduces the MongoDB module feature set.Chapter 6, MongoDB repositories introduces the repository support for MongoDB.
- Page 1 and 2: Spring Data MongoDB - Reference Doc
- Page 3 and 4: please define productname in your d
- Page 5 and 6: please define productname in your d
- Page 7 and 8: please define productname in your d
- Page 9 and 10: please define productname in your d
- Page 11: please define productname in your d
- Page 14 and 15: please define productname in your d
- Page 16 and 17: please define productname in your d
- Page 18 and 19: please define productname in your d
- Page 20 and 21: please define productname in your d
- Page 22 and 23: please define productname in your d
- Page 24 and 25: please define productname in your d
- Page 26 and 27: please define productname in your d
- Page 30 and 31: please define productname in your d
- Page 32 and 33: please define productname in your d
- Page 34 and 35: please define productname in your d
- Page 36 and 37: please define productname in your d
- Page 38 and 39: please define productname in your d
- Page 40 and 41: please define productname in your d
- Page 42 and 43: please define productname in your d
- Page 44 and 45: please define productname in your d
- Page 46 and 47: please define productname in your d
- Page 48 and 49: please define productname in your d
- Page 50 and 51: please define productname in your d
- Page 52 and 53: please define productname in your d
- Page 54 and 55: please define productname in your d
- Page 56 and 57: please define productname in your d
- Page 58 and 59: please define productname in your d
- Page 60 and 61: please define productname in your d
- Page 62 and 63: please define productname in your d
- Page 64 and 65: please define productname in your d
- Page 66 and 67: please define productname in your d
- Page 68 and 69: please define productname in your d
- Page 70 and 71: please define productname in your d
- Page 72 and 73: please define productname in your d
- Page 74 and 75: please define productname in your d
- Page 76 and 77: please define productname in your d
please define productname in your docbook file!The PageableArgumentResolver automatically resolves request parameters to build aPageRequest instance. By default it expects the following structure for the request parameters.Table 4.2. Request parameters evaluated by PageableArgumentResolverpagepage.sizepage.sortpage.sort.dirPage you want to retrieve.Size of the page you want to retrieve.Property that should be sorted by.Direction that should be used for sorting.In case you need multiple Pageables to be resolved from the request (for multiple tables, for example)you can use <strong>Spring</strong>'s @Qualifier annotation to distinguish one from another. The request parametersthen have to be prefixed with ${qualifier}_. So for a method signature like this:public String showUsers(Model model,@Qualifier("foo") Pageable first,@Qualifier("bar") Pageable second) { … }you have to populate foo_page and bar_page and the related subproperties.Configuring a global default on bean declarationThe PageableArgumentResolver will use a PageRequest with the first page and a page size of 10by default. It will use that value if it cannot resolve a PageRequest from the request (because of missingparameters, for example). You can configure a global default on the bean declaration directly. If youmight need controller method specific defaults for the Pageable, annotate the method parameter with@PageableDefaults and specify page (through pageNumber), page size (through value), sort (listof properties to sort by), and sortDir (the direction to sort by) as annotation attributes:public String showUsers(Model model,@PageableDefaults(pageNumber = 0, value = 30) Pageable pageable) { … }1.4.0.BUILD-SNAPSHOT<strong>Spring</strong> <strong>Data</strong> <strong>MongoDB</strong> -Reference Documentation 23