use of de.symeda.sormas.api.infrastructure.area.AreaCriteria in project SORMAS-Project by hzi-braunschweig.
the class AreasGrid method setLazyDataProvider.
public void setLazyDataProvider() {
DataProvider<AreaDto, AreaCriteria> dataProvider = DataProvider.fromFilteringCallbacks(query -> FacadeProvider.getAreaFacade().getIndexList(query.getFilter().orElse(null), query.getOffset(), query.getLimit(), query.getSortOrders().stream().map(sortOrder -> new SortProperty(sortOrder.getSorted(), sortOrder.getDirection() == SortDirection.ASCENDING)).collect(Collectors.toList())).stream(), query -> {
return (int) FacadeProvider.getAreaFacade().count(query.getFilter().orElse(null));
});
setDataProvider(dataProvider);
setSelectionMode(SelectionMode.NONE);
}
Aggregations