public class DatastorePageable
extends org.springframework.data.domain.PageRequest
The static methods can take either paged or unpaged Pageable
, while instance methods
only deal with a paged self object.
Modifier and Type | Method and Description |
---|---|
static org.springframework.data.domain.Pageable |
from(org.springframework.data.domain.Pageable pageable,
Cursor cursor,
Long totalCount)
Creates a
DatastorePageable wrapper for a paged request, but passes unpaged requests
back unchanged. |
static org.springframework.data.domain.Pageable |
from(org.springframework.data.domain.Pageable pageable,
String urlSafeCursor,
Long totalCount)
Creates a
DatastorePageable wrapper for a paged request, but passes unpaged requests
back unchanged. |
Long |
getTotalCount() |
String |
getUrlSafeCursor() |
org.springframework.data.domain.PageRequest |
next() |
Cursor |
toCursor() |
equals, first, getSort, hashCode, of, of, of, ofSize, previous, toString, withPage, withSort, withSort
getOffset, getPageNumber, getPageSize, hasPrevious, previousOrFirst
public static org.springframework.data.domain.Pageable from(org.springframework.data.domain.Pageable pageable, Cursor cursor, Long totalCount)
DatastorePageable
wrapper for a paged request, but passes unpaged requests
back unchanged.pageable
- The source Pageable
that can be paged or unpagedcursor
- Current cursor; null if not applicabletotalCount
- Total result countDatastorePageable
or the original unpaged Pageable
.public static org.springframework.data.domain.Pageable from(org.springframework.data.domain.Pageable pageable, String urlSafeCursor, Long totalCount)
DatastorePageable
wrapper for a paged request, but passes unpaged requests
back unchanged.pageable
- The source Pageable
that can be paged or unpagedurlSafeCursor
- Current cursor as ; null if not applicabletotalCount
- Current cursor; null if not applicableDatastorePageable
or the original unpaged Pageable
.public String getUrlSafeCursor()
public org.springframework.data.domain.PageRequest next()
next
in interface org.springframework.data.domain.Pageable
next
in class org.springframework.data.domain.PageRequest
public Cursor toCursor()
public Long getTotalCount()
Copyright © 2022. All rights reserved.