# ListDocumentsRequest.Builder
Date: 2012-02-24

## com.google.appengine.api.search
Class ListDocumentsRequest.Builder

    java.lang.Object
      com.google.appengine.api.search.ListDocumentsRequest.Builder

Enclosing class:
  ListDocumentsRequest

    public static final class ListDocumentsRequest.Builder

extends java.lang.Object

The builder of `ListDocumentsRequest`s.

Method Summary
`ListDocumentsRequest` `build()`
`ListDocumentsRequest.Builder` `setIncludeStartDoc(boolean includeStartDoc)` Sets whether or not to include the document whose ID is specified via the `setStartDocId(String)` method.
`ListDocumentsRequest.Builder` `setKeysOnly(boolean keysOnly)` Sets whether just documents containing just their key are returned, or whether the complete documents are returned.
`ListDocumentsRequest.Builder` `setLimit(java.lang.Integer limit)` Sets the maximum number of documents to return.
`ListDocumentsRequest.Builder` `setStartDocId(java.lang.String startDocId)` Sets the Id of the first document to return.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### setStartDocId

    public ListDocumentsRequest.Builder setStartDocId(java.lang.String startDocId)

  Sets the Id of the first document to return. You may exclude this document by using the `setIncludeStartDoc(boolean)` method.

  Parameters:
    `startDocId` - the Id of the first document to return
  Returns:
    this builder
  Throws:
    `java.lang.IllegalArgumentException` - if invalid document Id is given

### setIncludeStartDoc

    public ListDocumentsRequest.Builder setIncludeStartDoc(boolean includeStartDoc)

  Sets whether or not to include the document whose ID is specified via the `setStartDocId(String)` method.

  Parameters:
    `includeStartDoc` - whether or not to return the start index
  Returns:
    this builder

### setLimit

    public ListDocumentsRequest.Builder setLimit(java.lang.Integer limit)

  Sets the maximum number of documents to return.

  Parameters:
    `limit` - the maximum number of documents to return
  Returns:
    this builder
  Throws:
    `java.lang.IllegalArgumentException` - if negative or too large limit is given

### setKeysOnly

    public ListDocumentsRequest.Builder setKeysOnly(boolean keysOnly)

  Sets whether just documents containing just their key are returned, or whether the complete documents are returned.

  Parameters:
    `keysOnly` - whether to only return document keys
  Returns:
    this builder

### build

    public ListDocumentsRequest build()

  Returns:
    builds and returns a brand new instance of a `ListDocumentsRequest` using values set on this builder