Package com.codetroopers.play.elasticsearch.annotations

Examples of com.codetroopers.play.elasticsearch.annotations.IndexName


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

        String indexName = 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 static 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.codetroopers.play.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.