stat.setString(1, DateConverter.getFormattedDate(from, "yyyy-MM-dd 00:00:00.000"));
stat.setString(2, DateConverter.getFormattedDate(to, "yyyy-MM-dd 23:59:59.999"));
res = stat.executeQuery();
Map<String, SmallContentType> contentTypes = this.getContentManager().getSmallContentTypesMap();
while (res.next()) {
ContentStatistic statistic = new ContentStatistic();
String id = res.getString(1);
statistic.setId(id);
ContentRecordVO content = this.getContentManager().loadContentVO(id);
if (content == null) {
statistic.setDescr(id);
} else {
SmallContentType contentType = contentTypes.get(content.getTypeCode());
statistic.setDescr(content.getDescr());
statistic.setType(contentType.getDescr());
}
statistic.setVisits(new Integer(res.getInt(2)));
visitsStats.add(statistic);
}
} catch (Throwable t) {
processDaoException(t, "Error searching visits for contents", "searchVisitsForContents");
} finally {