|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.search.Document.Builder
public static final class Document.Builder
A builder of documents. This is not thread-safe.
Method Summary | |
---|---|
Document.Builder |
addField(Field.Builder builder)
Adds the field builder to the document builder. |
Document.Builder |
addField(Field field)
Adds the field to the builder. |
Document |
build()
Builds a valid document. |
Document.Builder |
setId(java.lang.String documentId)
Set the document id to a unique valid value. |
Document.Builder |
setLocale(java.util.Locale locale)
Sets the Locale the document is written in. |
Document.Builder |
setOrderId(int orderId)
Sets an order ID, which is used to return documents in a defined order in search results. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Document.Builder setId(java.lang.String documentId)
documentId
- the unique id for the document to be built
java.lang.IllegalArgumentException
- if documentId is not validpublic Document.Builder addField(Field.Builder builder)
builder
- the builder of the field to add
public Document.Builder addField(Field field)
field
- the field to add
java.lang.IllegalArgumentException
- if the field is invalidpublic Document.Builder setLocale(java.util.Locale locale)
Locale
the document is written in.
locale
- the Locale
the document is written in
public Document.Builder setOrderId(int orderId)
orderId
- an id used to specify the order this document will be
returned in search results
public Document build()
java.lang.IllegalArgumentException
- if the document built is not valid
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |