你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
CosmosPageRequest Class
- java.
lang. Object - org.
springframework. data. domain. AbstractPageRequest - org.
springframework. data. domain. PageRequest - com.
azure. spring. data. cosmos. core. query. CosmosPageRequest
- com.
- org.
- org.
public class CosmosPageRequest
extends org.springframework.data.domain.PageRequest
CosmosPageRequest representing page request during pagination query, field FeedResponse#getContinuationToken() response continuation token} is saved to help query next page.
The requestContinuation token should be saved after each request and reused in later queries.
Constructor Summary
Constructor | Description |
---|---|
CosmosPageRequest(int page, int size, String requestContinuation) |
Creates a new PageRequest with unsorted parameters applied. |
CosmosPageRequest(int page, int size, String requestContinuation, Sort sort) |
Creates a new CosmosPageRequest with sort parameters applied. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object obj) |
long | getOffset() |
String |
getRequestContinuation()
To get request continuation |
int | hashCode() |
org.springframework.data.domain.PageRequest | next() |
static
Cosmos |
of(int page, int size, String requestContinuation, Sort sort)
Creates a new CosmosPageRequest |
static
Cosmos |
of(long offset, int page, int size, String requestContinuation, Sort sort)
Creates a new CosmosPageRequest |
Methods inherited from java.lang.Object
Methods inherited from org.springframework.data.domain.AbstractPageRequest
Methods inherited from org.springframework.data.domain.PageRequest
Constructor Details
CosmosPageRequest
public CosmosPageRequest(int page, int size, String requestContinuation)
Creates a new PageRequest with unsorted parameters applied.
Parameters:
CosmosPageRequest
public CosmosPageRequest(int page, int size, String requestContinuation, Sort sort)
Creates a new CosmosPageRequest with sort parameters applied.
Parameters:
Method Details
equals
public boolean equals(Object obj)
Overrides:
CosmosPageRequest.equals(Object obj)Parameters:
getOffset
public long getOffset()
Overrides:
CosmosPageRequest.getOffset()getRequestContinuation
public String getRequestContinuation()
To get request continuation
Returns:
hashCode
public int hashCode()
Overrides:
CosmosPageRequest.hashCode()next
public PageRequest next()
Overrides:
CosmosPageRequest.next()of
public static CosmosPageRequest of(int page, int size, String requestContinuation, Sort sort)
Creates a new CosmosPageRequest
Parameters:
Returns:
of
public static CosmosPageRequest of(long offset, int page, int size, String requestContinuation, Sort sort)
Creates a new CosmosPageRequest
Parameters:
Returns: