Package org.springframework.data.elasticsearch.annotations

Examples of org.springframework.data.elasticsearch.annotations.Document


    this.context = new StandardEvaluationContext();
    this.parser = new SpelExpressionParser();

    Class<T> clazz = typeInformation.getType();
    if (clazz.isAnnotationPresent(Document.class)) {
      Document document = clazz.getAnnotation(Document.class);
      Assert.hasText(document.indexName(),
          " Unknown indexName. Make sure the indexName is defined. e.g @Document(indexName=\"foo\")");
      this.indexName = typeInformation.getType().getAnnotation(Document.class).indexName();
      this.indexType = hasText(document.type()) ? document.type() : clazz.getSimpleName().toLowerCase(Locale.ENGLISH);
      this.shards = typeInformation.getType().getAnnotation(Document.class).shards();
      this.replicas = typeInformation.getType().getAnnotation(Document.class).replicas();
      this.refreshInterval = typeInformation.getType().getAnnotation(Document.class).refreshInterval();
      this.indexStoreType = typeInformation.getType().getAnnotation(Document.class).indexStoreType();
    }
View Full Code Here


    public SimpleElasticsearchPersistentEntity(TypeInformation<T> typeInformation) {
        super(typeInformation);
        this.context = new StandardEvaluationContext();
        Class<T> clazz = typeInformation.getType();
        if(clazz.isAnnotationPresent(Document.class)){
            Document document = clazz.getAnnotation(Document.class);
            Assert.hasText(document.indexName(), " Unknown indexName. Make sure the indexName is defined. e.g @Document(indexName=\"foo\")");
            this.indexName = typeInformation.getType().getAnnotation(Document.class).indexName();
            this.indexType = hasText(document.type())? document.type() : clazz.getSimpleName().toLowerCase(Locale.ENGLISH);
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.annotations.Document

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.