Package com.google.apphosting.api.search.DocumentPb.FieldValue

Examples of com.google.apphosting.api.search.DocumentPb.FieldValue.ContentType


   * @throws IllegalArgumentException if the document contains an invalid set of fields.
   */
  public static void checkFieldSet(DocumentPb.Document document) {
    Set<Pair<String, ContentType> > noRepeatNames = Sets.newHashSet();
    for (DocumentPb.Field field : document.getFieldList()) {
      ContentType type = field.getValue().getType();
      if (type == ContentType.NUMBER || type == ContentType.DATE) {
        Pair<String, ContentType> typedField = new Pair<String, ContentType>(field.getName(), type);
        if (!noRepeatNames.add(typedField)) {
          throw new IllegalArgumentException(
              "Invalid document " + document.getId() + ": field " + field.getName() +
View Full Code Here

TOP

Related Classes of com.google.apphosting.api.search.DocumentPb.FieldValue.ContentType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.