Package com.github.jmkgreen.morphia

Examples of com.github.jmkgreen.morphia.Datastore.createQuery()


                        hasHeader = false;
                        continue;
                    }

                    final String[] columns = s.split(";");
                    List<Meteolog> check = ds.createQuery(Meteolog.class).field("time").equal(getDate("dd-MM-yyyy HH:mm", columns[1], log)).asList();

                    if (check != null && !check.isEmpty()) {
                        log.debug("data exist, continue");
                        lineDouble++;
                        continue;
View Full Code Here


    protected static void runMapReduceMinMax(String file, String reduce, Logger log) {

        final Datastore ds = MongoConnectionHelper.ds;

        final String map = getJsFromFile(file, log);
        final MapreduceResults<MapReduceMinMax> mrRes = ds.mapReduce(MapreduceType.MERGE, ds.createQuery(Meteolog.class), map, reduce, null, null, MapReduceMinMax.class);

        log.debug(
                "mrRes --> count all:" + mrRes.createQuery().countAll());
        log.debug(
                "mrRes --> tot time: " + mrRes.getElapsedMillis());
View Full Code Here

    protected static void runMapReduceHisotryMinMax(String file, String reduce, Logger log) {

        final Datastore ds = MongoConnectionHelper.ds;

        final String map = getJsFromFile(file, log);
        final MapreduceResults<MapReduceHistoryMinMax> mrRes = ds.mapReduce(MapreduceType.MERGE, ds.createQuery(Meteolog.class), map, reduce, null, null, MapReduceHistoryMinMax.class);

        log.debug("mrRes --> count all:" + mrRes.createQuery().countAll());
        log.debug("mrRes --> tot time: " + mrRes.getElapsedMillis());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.