for (int i = 0; i < 24; i++) {
Date start = new Date(currentDate.getTime() + i * TimeHelper.ONE_HOUR);
Date end = new Date(start.getTime() + TimeHelper.ONE_HOUR);
String metricReportKey = productLine + ":" + start.getTime();
MetricReport report = reports.get(metricReportKey);
if (report == null) {
report = m_reportService.queryMetricReport(productLine, start, end);
reports.put(metricReportKey, report);
}
MetricItem reportItem = report.findMetricItem(metricId);
if (reportItem == null) {
reportItem = new MetricItem(metricId);
}
metricItems.add(reportItem);