use of org.onebusaway.transit_data.model.problems.StopProblemReportSummaryBean in project onebusaway-application-modules by camsys.
the class UserReportingServiceImpl method getStopProblemReportSummaries.
@Override
public ListBean<StopProblemReportSummaryBean> getStopProblemReportSummaries(StopProblemReportQueryBean query) {
List<T2<AgencyAndId, Integer>> records = _userReportingDao.getStopProblemReportSummaries(query.getAgencyId(), query.getTimeFrom(), query.getTimeTo(), query.getStatus());
List<StopProblemReportSummaryBean> beans = new ArrayList<StopProblemReportSummaryBean>(records.size());
for (T2<AgencyAndId, Integer> record : records) {
AgencyAndId stopId = record.getFirst();
Integer count = record.getSecond();
StopProblemReportSummaryBean bean = new StopProblemReportSummaryBean();
bean.setStop(_stopBeanService.getStopForId(stopId));
bean.setStatus(query.getStatus());
bean.setCount(count);
beans.add(bean);
}
return new ListBean<StopProblemReportSummaryBean>(beans, false);
}
Aggregations