Examples of DailyCounts


Examples of nz.org.winters.appspot.acrareporter.store.DailyCounts

        dc = ObjectifyService.ofy().load().type(DailyCounts.class).filter("PACKAGE_NAME", appPackage.PACKAGE_NAME).list();
        ObjectifyService.ofy().delete().entities(dc);
        dc.clear();

        DailyCounts packageDaily = null;
        DailyCounts userDaily = null;

        List<BasicErrorInfo> basicErrorInfos = ObjectifyService.ofy().load().type(BasicErrorInfo.class).filter("PACKAGE_NAME", appPackage.PACKAGE_NAME).order("Timestamp").list();
        for (BasicErrorInfo basicErrorInfo : basicErrorInfos)
        {
          DailyCountsGetters.getDate(user.id, basicErrorInfo.Timestamp);
          if (userDaily == null || packageDaily == null || !packageDaily.date.equals(DailyCountsGetters.removeTimeFromDate(basicErrorInfo.Timestamp)) || !userDaily.date.equals(DailyCountsGetters.removeTimeFromDate(basicErrorInfo.Timestamp)))
          {
            if (userDaily != null)
            {
              ObjectifyService.ofy().save().entity(userDaily);
            }
            if (packageDaily != null)
            {
              ObjectifyService.ofy().save().entity(packageDaily);
            }
            userDaily = DailyCountsGetters.getDate(user.id, basicErrorInfo.Timestamp);
            packageDaily = DailyCountsGetters.getDate(basicErrorInfo.PACKAGE_NAME, basicErrorInfo.Timestamp);

          }

          userDaily.incReports();
          packageDaily.incReports();

          user.Totals.incReports();
          appPackage.Totals.incReports();

          if (basicErrorInfo.fixed)
          {
            userDaily.incFixed();
            packageDaily.incFixed();
            user.Totals.incFixed();
            appPackage.Totals.incFixed();
          }
          if (basicErrorInfo.fixed && !basicErrorInfo.lookedAt)
          {
            basicErrorInfo.lookedAt = true;
            ObjectifyService.ofy().save().entity(basicErrorInfo);
          }
          if (basicErrorInfo.lookedAt)
          {
            userDaily.incLookedAt();
            packageDaily.incLookedAt();
            user.Totals.incLookedAt();
            appPackage.Totals.incLookedAt();
          }
        }
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.