use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportSearchDto in project midpoint by Evolveum.
the class PageReports method clearSearchPerformed.
private void clearSearchPerformed(AjaxRequestTarget target) {
searchModel.setObject(new ReportSearchDto());
Table panel = getReportTable();
DataTable table = panel.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) table.getDataProvider();
provider.setQuery(createQuery());
ReportsStorage storage = getSessionStorage().getReports();
storage.setReportSearch(searchModel.getObject());
storage.setPaging(null);
panel.setCurrentPage(null);
target.add((Component) panel);
}
use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportSearchDto in project midpoint by Evolveum.
the class PageReports method createQuery.
private ObjectQuery createQuery() {
ReportSearchDto dto = searchModel.getObject();
String text = dto.getText();
Boolean parent = !dto.isParent();
S_AtomicFilterEntry q = QueryBuilder.queryFor(ReportType.class, getPrismContext());
if (StringUtils.isNotEmpty(text)) {
PolyStringNormalizer normalizer = getPrismContext().getDefaultPolyStringNormalizer();
String normalizedText = normalizer.normalize(text);
q = q.item(ReportType.F_NAME).eqPoly(normalizedText).matchingNorm().and();
}
if (parent) {
q = q.item(ReportType.F_PARENT).eq(true).and();
}
return q.all().build();
}
Aggregations