Examples of HeavyReport


Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    DailyReportContent content = m_dailyReportContentDao.findByPK(id, DailyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new HeavyReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    HourlyReportContent content = m_hourlyReportContentDao.findByPK(id, HourlyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new HeavyReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new HeavyReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new HeavyReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    }
  }

  @Override
  public HeavyReport queryHourlyReport(String domain, Date start, Date end) {
    HeavyReportMerger merger = new HeavyReportMerger(new HeavyReport(domain));
    long startTime = start.getTime();
    long endTime = end.getTime();
    String name = Constants.REPORT_HEAVY;

    for (; startTime < endTime; startTime = startTime + TimeHelper.ONE_HOUR) {
      List<HourlyReport> reports = null;
      try {
        reports = m_hourlyReportDao.findAllByDomainNamePeriod(new Date(startTime), domain, name,
              HourlyReportEntity.READSET_FULL);
      } catch (DalException e) {
        Cat.logError(e);
      }
      if (reports != null) {
        for (HourlyReport report : reports) {
          String xml = report.getContent();

          try {
            if (xml != null && xml.length() > 0) {
              HeavyReport reportModel = com.dianping.cat.home.heavy.transform.DefaultSaxParser.parse(xml);
              reportModel.accept(merger);
            } else {
              HeavyReport reportModel = queryFromHourlyBinary(report.getId(), domain);
              reportModel.accept(merger);
            }
          } catch (DalNotFoundException e) {
            //ignore
          } catch (Exception e) {
            Cat.logError(e);
          }
        }
      }
    }
    HeavyReport heavyReport = merger.getHeavyReport();

    heavyReport.setStartTime(start);
    heavyReport.setEndTime(new Date(end.getTime() - 1));

    return heavyReport;
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    } catch (DalNotFoundException e) {
      //ignore
    } catch (Exception e) {
      Cat.logError(e);
    }
    return new HeavyReport(domain);
  }
View Full Code Here

Examples of com.dianping.cat.home.heavy.entity.HeavyReport

    } catch (DalNotFoundException e) {
      //ignore
    } catch (Exception e) {
      Cat.logError(e);
    }
    return new HeavyReport(domain);
  }
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.