Package com.github.cleverage.elasticsearch.annotations

Examples of com.github.cleverage.elasticsearch.annotations.IndexName


            Logger.error("ElasticSearch : Class " + this.getClass().getCanonicalName() + " no contain @IndexType(name) annotation ");
        }
        String indexType = indexTypeAnnotation.name();

        String indexName = IndexService.INDEX_DEFAULT;
        IndexName indexNameAnnotation = this.getClass().getAnnotation(IndexName.class);
        if(indexNameAnnotation != null) {
            indexName = indexNameAnnotation.name();
        }

        return new IndexQueryPath(indexName, indexType);
    }
View Full Code Here


            Logger.error("ElasticSearch : Class " + this.getClass().getCanonicalName() + " no contain @IndexType(name) annotation ");
        }
        String indexType = indexTypeAnnotation.name();

        String indexName = IndexService.INDEX_DEFAULT;
        IndexName indexNameAnnotation = this.getClass().getAnnotation(IndexName.class);
        if(indexNameAnnotation != null) {
            indexName = indexNameAnnotation.name();
        }

        return new IndexQueryPath(indexName, indexType);
    }
View Full Code Here

            }
        }
    }

    private String getIndexName(Object instance, String[] indexNames) {
        IndexName indexNameAnnotation = instance.getClass().getAnnotation(IndexName.class);
        if (indexNameAnnotation == null) {
            if(indexNames.length>0) {
                return indexNames[0];
            }
            return null;
        }
        return indexNameAnnotation.name();
    }
View Full Code Here

TOP

Related Classes of com.github.cleverage.elasticsearch.annotations.IndexName

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.