Examples of NoSQLQueryCallback


Examples of com.serotonin.m2m2.db.dao.nosql.NoSQLQueryCallback

            handler.startPoint(point);

            edv.setReportPointId(point.getReportPointId());
            final NoSQLDao dao = Common.databaseProxy.getNoSQLProxy().createNoSQLDao(ReportPointValueTimeSerializer.get(), "reports");
            final String pointStore = instanceId + "_" + point.getReportPointId();
            dao.getData(pointStore, 0, Long.MAX_VALUE, -1, false, new NoSQLQueryCallback(){

        @Override
        public void entry(String storeName, long timestamp, ITime entry) {
          PointValueTime pvt = (PointValueTime) entry;
          edv.setValue(pvt.getValue());
View Full Code Here

Examples of com.serotonin.m2m2.db.dao.nosql.NoSQLQueryCallback

        // If the report had undefined start or end times, update them with values from the data.
        if (instance.isFromInception() || instance.isToNow()) {
          if(instance.isFromInception()){
            final List<ITime> firstValueTimeList = new ArrayList<ITime>();
        dao.getData("reports", 0L, Long.MAX_VALUE, 1, false, new NoSQLQueryCallback(){
          @Override
          public void entry(String storeName, long timestamp,
              ITime entry) {
            firstValueTimeList.add(entry);
          }
             });
 
        if(firstValueTimeList.size() > 0){
          instance.setReportStartTime(firstValueTimeList.get(0).getTime());
        }
          }   
          if(instance.isToNow()){
            final List<ITime> lastValueTimeList = new ArrayList<ITime>();
        dao.getData("reports", 0L, Long.MAX_VALUE, 1, true, new NoSQLQueryCallback(){
          @Override
          public void entry(String storeName, long timestamp,
              ITime entry) {
            lastValueTimeList.add(entry);
          }
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.