com.google.appengine.api.search
Class Cursor.Builder

java.lang.Object
  extended by com.google.appengine.api.search.Cursor.Builder
Enclosing class:
Cursor

public static final class Cursor.Builder
extends java.lang.Object

A builder which constructs Cursor objects.


Method Summary
 Cursor build()
          Construct the final message.
 Cursor build(java.lang.String webSafeString)
          Construct the final message.
 Cursor.Builder setPerResult(boolean perResult)
          Sets whether or not to return a Cursor on each individual result in Results or a single cursor with all Results.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setPerResult

public Cursor.Builder setPerResult(boolean perResult)
Sets whether or not to return a Cursor on each individual result in Results or a single cursor with all Results.

Parameters:
perResult - if True, then return a Cursor with each ScoredDocument result, otherwise return a single Cursor with Results
Returns:
this Builder

build

public Cursor build(java.lang.String webSafeString)
Construct the final message.

Parameters:
webSafeString - use a cursor returned from a previous set of search results as a starting point to retrieve the next set of results. This can get you better performance, and also improves the consistency of pagination through index updates
Returns:
the Cursor built from the parameters entered on this Builder
Throws:
java.lang.IllegalArgumentException - if the cursor string is invalid

build

public Cursor build()
Construct the final message.

Returns:
the Cursor built from the parameters entered on this Builder