Package play.modules.elasticsearch.mapping

Examples of play.modules.elasticsearch.mapping.MappingException


  public CollectionFieldMapper(MapperFactory factory, Field field, String prefix) {
    super(field, prefix);

    if (!Collection.class.isAssignableFrom(field.getType())) {
      throw new MappingException("field must be of Collection type");
    }

    ElasticSearchEmbedded embed = field.getAnnotation(ElasticSearchEmbedded.class);
    nestedMode = (embed != null);
View Full Code Here


            break;
          }
        }

        if (!knownField) {
          throw new MappingException("Unknown field specified in " + meta);
        }
      }
    }

    // Set up fields
View Full Code Here

    if (clazz.equals(play.db.Model.class)) {
      return (ModelMapper<M>) new UniversalModelMapper();
    }
   
    if (!MappingUtil.isSearchable(clazz)) {
      throw new MappingException("Class \"" + clazz.getCanonicalName() + "\" must be annotated with @ElasticSearchable");
    }

    if (play.db.Model.class.isAssignableFrom(clazz)) {
      return (ModelMapper<M>) new PlayModelMapper<play.db.Model>(this,
          (Class<play.db.Model>) clazz);
    } else {
      throw new MappingException(
          "No mapper available for non-play.db.Model models at this time");
    }
  }
View Full Code Here

TOP

Related Classes of play.modules.elasticsearch.mapping.MappingException

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.