Package org.springframework.data.elasticsearch.annotations

Examples of org.springframework.data.elasticsearch.annotations.Document.type()


    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


    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

        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);
        }
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
View Full Code Here

        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);
        }
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.