Package com.mongodb

Examples of com.mongodb.Cursor


                .batchSize(100)
                .outputMode(AggregationOptions.OutputMode.CURSOR)
                .allowDiskUse(true)
                .build();

        Cursor cursor = coll.aggregate(pipeline, aggregationOptions);
        while (cursor.hasNext()) {
            System.out.println(cursor.next());
        }

        // clean up
        db.dropDatabase();
        mongoClient.close();
View Full Code Here


    @Override
    public MorphiaIterator<U, U> aggregate(final String collectionName, final Class<U> target, final AggregationOptions options,
                                           final ReadPreference readPreference) {
        LOG.debug("stages = " + stages);

        Cursor cursor = collection.aggregate(stages, options, readPreference);
        return new MorphiaIterator<U, U>(cursor, mapper, target, collection.getName(), mapper.createEntityCache());
    }
View Full Code Here

TOP

Related Classes of com.mongodb.Cursor

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.