* The requestContinuation token should be saved after each request and reused in later queries.
*/
-public class DocumentDbPageRequest extends PageRequest {
+public class CosmosPageRequest extends PageRequest {
private static final long serialVersionUID = 6093304300037688375L;
// Request continuation token used to resume query
private String requestContinuation;
- public DocumentDbPageRequest(int page, int size, String requestContinuation) {
- super(page, size);
+ public CosmosPageRequest(int page, int size, String requestContinuation) {
+ super(page, size, Sort.unsorted());
this.requestContinuation = requestContinuation;
}
- public static DocumentDbPageRequest of(int page, int size, String requestContinuation) {
- return new DocumentDbPageRequest(page, size, requestContinuation);
+ public static CosmosPageRequest of(int page, int size, String requestContinuation) {
+ return new CosmosPageRequest(page, size, requestContinuation);
}
- public DocumentDbPageRequest(int page, int size, String requestContinuation, Sort sort) {
+ public CosmosPageRequest(int page, int size, String requestContinuation, Sort sort) {
super(page, size, sort);
this.requestContinuation = requestContinuation;
}
- public static DocumentDbPageRequest of(int page, int size, String requestContinuation, Sort sort) {
- return new DocumentDbPageRequest(page, size, requestContinuation, sort);
+ public static CosmosPageRequest of(int page, int size, String requestContinuation, Sort sort) {
+ return new CosmosPageRequest(page, size, requestContinuation, sort);
}
public String getRequestContinuation() {
@@ -58,11 +59,11 @@ public boolean equals(Object obj) {
return true;
}
- if (!(obj instanceof DocumentDbPageRequest)) {
+ if (!(obj instanceof CosmosPageRequest)) {
return false;
}
- final DocumentDbPageRequest that = (DocumentDbPageRequest) obj;
+ final CosmosPageRequest that = (CosmosPageRequest) obj;
final boolean continuationTokenEquals = requestContinuation != null ?
requestContinuation.equals(that.requestContinuation) : that.requestContinuation == null;
diff --git a/src/main/java/com/microsoft/azure/spring/data/cosmosdb/core/query/CriteriaType.java b/src/main/java/com/microsoft/azure/spring/data/cosmosdb/core/query/CriteriaType.java
index 96b79ccf..d4cb552a 100644
--- a/src/main/java/com/microsoft/azure/spring/data/cosmosdb/core/query/CriteriaType.java
+++ b/src/main/java/com/microsoft/azure/spring/data/cosmosdb/core/query/CriteriaType.java
@@ -42,7 +42,6 @@ public enum CriteriaType {
@Getter
private String sqlKeyword;
- // Map Part.Type to CriteriaType
private static final Map