use of io.crnk.legacy.queryParams.params.FilterParams in project crnk-framework by crnk-project.
the class DefaultQueryParamsConverter method applyFiltering.
protected void applyFiltering(QuerySpec spec, QueryParams queryParams) {
List<FilterSpec> filters = spec.getFilters();
Map<String, FilterParams> decodedFiltersMap = new LinkedHashMap<>();
if (filters != null && !filters.isEmpty()) {
String resourceType = getResourceType(spec.getResourceClass());
Map<String, Set<String>> map = new LinkedHashMap<>();
for (FilterSpec filter : filters) {
applyFilterSpec(map, filter);
}
decodedFiltersMap.put(resourceType, new FilterParams(map));
}
queryParams.setFilters(new TypedParams<>(Collections.unmodifiableMap(decodedFiltersMap)));
}
Aggregations