Package com.mongodb

Examples of com.mongodb.AggregationOptions$Builder


        for (DBObject result : output.results()) {
            System.out.println(result);
        }

        // Aggregation Cursor
        AggregationOptions aggregationOptions = AggregationOptions.builder()
                .batchSize(100)
                .outputMode(AggregationOptions.OutputMode.CURSOR)
                .allowDiskUse(true)
                .build();
View Full Code Here


                     new Book("Divine Comedy", "Dante", 1),
                     new Book("Eclogues", "Dante", 2),
                     new Book("The Odyssey", "Homer", 10),
                     new Book("Iliad", "Homer", 10));

        AggregationOptions options = AggregationOptions.builder()
                                                     .outputMode(AggregationOptions.OutputMode.CURSOR)
                                                     .build();
        MorphiaIterator<Author, Author> aggregate = getDs().<Book, Author>createAggregation(Book.class)
                                                           .group("author", grouping("books", push("title")))
                                                           .out(Author.class, options);
View Full Code Here

TOP

Related Classes of com.mongodb.AggregationOptions$Builder

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.