Package org.mongodb.morphia.mapping.cache

Examples of org.mongodb.morphia.mapping.cache.EntityCache


        final long start = System.nanoTime();
        final List<DBObject> list = getDs().getDB().getCollection("Address")
                                        .find()
                                        .sort(new BasicDBObject("name", 1))
                                        .toArray();
        final EntityCache entityCache = new DefaultEntityCache();
        final List<Address> resultList = new LinkedList<Address>();
        for (final DBObject dbObject : list) {
            final Address address = getMorphia().fromDBObject(Address.class, dbObject, entityCache);
            resultList.add(address);
        }
View Full Code Here


        //TODO remove this after testing.
        if (dbColl == null) {
            dbColl = getCollection(qi.getEntityClass());
        }

        final EntityCache cache = createCache();

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing findAndModify(" + dbColl.getName() + ") with delete ...");
        }
View Full Code Here

        if (LOG.isTraceEnabled()) {
            LOG.info("Executing " + cmd.toString());
        }

        final EntityCache cache = createCache();
        MapreduceResults<T> results = new MapreduceResults<T>(dbColl.mapReduce(baseCommand));

        results.setType(type);
        if (MapreduceType.INLINE.equals(type)) {
            results.setInlineRequiredOptions(outputType, getMapper(), cache);
View Full Code Here

TOP

Related Classes of org.mongodb.morphia.mapping.cache.EntityCache

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.