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

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

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

A builder which constructs Schema objects.


Method Summary
 Schema.Builder addTypedField(java.lang.String fieldName, Field.FieldType fieldType)
          Adds typed field name to the schema builder.
 Schema build()
          Builds a valid document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addTypedField

public Schema.Builder addTypedField(java.lang.String fieldName,
                                    Field.FieldType fieldType)
Adds typed field name to the schema builder. Allows multiple field types with the same name.

Parameters:
fieldName - the field name to add to the schema
Returns:
this document builder

build

public Schema build()
Builds a valid document. The builder must have set a valid document id, and have a non-empty set of valid fields.

Returns:
the schema built by this builder
Throws:
java.lang.IllegalArgumentException - if the document built is not valid