stat.setString(2, DateConverter.getFormattedDate(to, "yyyy-MM-dd 23:59:59.999"));
res = stat.executeQuery();
IPageManager pageManager = this.getPageManager();
String langCode = this.getLangManager().getDefaultLang().getCode();
while (res.next()) {
PageStatistic statistic = new PageStatistic();
String code = res.getString(1);
statistic.setCode(code);
IPage page = pageManager.getPage(code);
String descr = (page!=null) ? page.getTitle(langCode) : code;
statistic.setDescr(descr);
statistic.setVisits(new Integer(res.getInt(2)));
visitsStats.add(statistic);
}
} catch (Throwable t) {
processDaoException(t, "Error searching visits for pages", "searchVisitsForPages");
} finally {