Package org.mongodb.morphia.annotations

Examples of org.mongodb.morphia.annotations.Indexes


    private void processClassAnnotations(final DBCollection dbColl, final MappedClass mc, final boolean background) {
        //Ensure indexes from class annotation
        final List<Annotation> indexes = mc.getAnnotations(Indexes.class);
        if (indexes != null) {
            for (final Annotation ann : indexes) {
                final Indexes idx = (Indexes) ann;
                if (idx != null && idx.value() != null && idx.value().length > 0) {
                    for (final Index index : idx.value()) {
                        final BasicDBObject fields = QueryImpl.parseFieldsString(index.value(),
                                                                                 mc.getClazz(),
                                                                                 mapper,
                                                                                 !index.disableValidation());
                        ensureIndex(dbColl, index.name(), fields, index.unique(), index.dropDups(),
View Full Code Here

TOP

Related Classes of org.mongodb.morphia.annotations.Indexes

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.