public class Paginator extends net.spy.memcached.compat.SpyObject implements java.util.Iterator<ViewResponse>
Constructor and Description |
---|
Paginator(CouchbaseClient client,
View view,
Query query,
int numDocs)
Create a new Paginator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Check if there is still a ViewResult left to fetch.
|
ViewResponse |
next()
Returns the next ViewResult object to iterate over.
|
void |
remove()
Remove is not supported while iterating over a ViewResult.
|
public Paginator(CouchbaseClient client, View view, Query query, int numDocs)
client
- the CouchbaseClient object to run the queries on.view
- the instance of the View to run the Queries against.query
- the instance of the Query object for the params.numDocs
- the number of the documents to return per page (must be
greater than zero).public boolean hasNext()
hasNext
in interface java.util.Iterator<ViewResponse>
public ViewResponse next()
next
in interface java.util.Iterator<ViewResponse>
public void remove()
remove
in interface java.util.Iterator<ViewResponse>
Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.