aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/grouping/Continuation.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/grouping/Continuation.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/grouping/Continuation.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/grouping/Continuation.java b/container-search/src/main/java/com/yahoo/search/grouping/Continuation.java
new file mode 100644
index 00000000000..63139348ab3
--- /dev/null
+++ b/container-search/src/main/java/com/yahoo/search/grouping/Continuation.java
@@ -0,0 +1,24 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.search.grouping;
+
+import com.yahoo.search.grouping.vespa.ContinuationDecoder;
+
+/**
+ * <p>This class represents a piece of data stored by the grouping framework within a grouping result, which can
+ * subsequently be sent back along with the original request to navigate across a large result set. It is an opaque
+ * data object that is not intended to be human readable.</p>
+ *
+ * <p>To render a Cookie within a result set, you simply need to call {@link #toString()}.</p>
+ *
+ * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
+ */
+public abstract class Continuation {
+
+ public static final String NEXT_PAGE = "next";
+ public static final String PREV_PAGE = "prev";
+ public static final String THIS_PAGE = "this";
+
+ public static Continuation fromString(String str) {
+ return ContinuationDecoder.decode(str);
+ }
+}