com.couchbase.client.protocol.views
Class Paginator

java.lang.Object
  extended by com.couchbase.client.protocol.views.Paginator
All Implemented Interfaces:
java.util.Iterator<ViewResponse>

public class Paginator
extends java.lang.Object
implements java.util.Iterator<ViewResponse>


Constructor Summary
Paginator(CouchbaseClient client, View view, Query query, int limit)
          Create a new Paginator.
 
Method Summary
 boolean hasNext()
           
 ViewResponse next()
           
 void remove()
          Remove is not supported while iterating over a ViewResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Paginator

public Paginator(CouchbaseClient client,
                 View view,
                 Query query,
                 int limit)
Create a new Paginator.

Parameters:
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.
limit - the number of documents to return per next() call.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<ViewResponse>

next

public ViewResponse next()
Specified by:
next in interface java.util.Iterator<ViewResponse>

remove

public void remove()
Remove is not supported while iterating over a ViewResult.

Specified by:
remove in interface java.util.Iterator<ViewResponse>


Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.