Package io.micronaut.data.model
Interface Pageable
- All Superinterfaces:
- Sort
Models pageable data. The 
from(int, int) method can be used to construct a new instance to pass to Micronaut Data methods.- Since:
- 1.0.0
- Author:
- boros, graemerocher
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.micronaut.data.model.SortSort.Order
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NonNull Pageablefrom(int page) Creates a newPageableat the given offset with a default size of 10.static @NonNull Pageablefrom(int page, int size) Creates a newPageableat the given offset.static @NonNull PageableCreates a newPageableat the given offset.static @NonNull PageableCreates a newPageableat the given offset.intdefault longOffset in the requested collection.default @NonNull List<Sort.Order>intgetSize()Maximum size of the page to be returned.default @NonNull SortgetSort()default booleanisSorted()default booleandefault @NonNull Pageablenext()default @NonNull Pageableorder(@NonNull Sort.Order order) Adds an order object.default @NonNull PageableOrders by the specified property name (defaults to ascending).default @NonNull Pageableorder(@NonNull String propertyName, Sort.Order.Direction direction) Orders by the specified property name and direction.default @NonNull Pageableprevious()static @NonNull Pageableunpaged()
- 
Field Details- 
UNPAGEDConstant for no pagination.
 
- 
- 
Method Details- 
getNumberint getNumber()- Returns:
- The page number.
 
- 
getSizeint getSize()Maximum size of the page to be returned. A value of -1 indicates no maximum.- Returns:
- size of the requested page of items
 
- 
getOffsetdefault long getOffset()Offset in the requested collection. Defaults to zero.- Returns:
- offset in the requested collection
 
- 
getSort- Returns:
- The sort definition to use.
 
- 
next- Returns:
- The next pageable.
 
- 
previous- Returns:
- The previous pageable
 
- 
isUnpageddefault boolean isUnpaged()- Returns:
- Is unpaged
 
- 
orderDescription copied from interface:SortOrders by the specified property name (defaults to ascending).
- 
isSorteddefault boolean isSorted()
- 
orderDescription copied from interface:SortAdds an order object.
- 
order@NonNull default @NonNull Pageable order(@NonNull @NonNull String propertyName, @NonNull Sort.Order.Direction direction) Description copied from interface:SortOrders by the specified property name and direction.
- 
getOrderBy- Specified by:
- getOrderByin interface- Sort
- Returns:
- The order definitions for this sort.
 
- 
fromCreates a newPageableat the given offset with a default size of 10.- Parameters:
- page- The page
- Returns:
- The pageable
 
- 
fromCreates a newPageableat the given offset.- Parameters:
- page- The page
- size- the size
- Returns:
- The pageable
 
- 
fromCreates a newPageableat the given offset.- Parameters:
- page- The page
- size- the size
- sort- the sort
- Returns:
- The pageable
 
- 
fromCreates a newPageableat the given offset.- Parameters:
- sort- the sort
- Returns:
- The pageable
 
- 
unpaged- Returns:
- A new instance without paging data.
 
 
-