use of org.hippoecm.hst.content.beans.query.filter.BaseFilter in project hippo by NHS-digital-website.
the class ProjectUpdateFeedComponent method addYearFilter.
private void addYearFilter(List<BaseFilter> filters, String year, HstQuery query) {
final Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, Integer.parseInt(year));
Filter filter = query.createFilter();
try {
filter.addEqualTo("website:updatetimestamp", calendar, DateTools.Resolution.YEAR);
filters.add(filter);
} catch (final FilterException exception) {
log.error("Error trying to add year filter", exception);
}
}
Aggregations