@@ -0,0 +1,2676 @@
+package org.springframework.data.rest.webmvc;%0A%0Aimport java.util.List;%0A%0Aimport lombok.NonNull;%0A%0Aimport org.springframework.data.querydsl.QSort;%0Aimport org.springframework.data.rest.webmvc.support.DefaultedPageable;%0Aimport org.springframework.data.web.PagedResourcesAssembler;%0Aimport org.springframework.util.MultiValueMap;%0A%0Aimport pl.openrest.filters.query.PredicateContext;%0Aimport pl.openrest.filters.query.PredicateContextBuilderFactory;%0Aimport pl.openrest.filters.query.PredicateContextBuilderFactory.PredicateContextBuilder;%0Aimport pl.openrest.filters.repository.PredicateContextRepositoryInvoker;%0Aimport pl.openrest.predicate.parser.FilterPart;%0Aimport pl.openrest.predicate.parser.FilterTreeBuilder;%0A%0Apublic abstract class AbstractFiltersController extends AbstractRepositoryRestController %7B%0A%0A    public static final String FILTERS_PARAM_NAME = %22filter%22;%0A%0A    protected final PredicateContextBuilderFactory predicateContextBuilderFactory;%0A    protected final FilterTreeBuilder filterTreeBuilder;%0A %0A    public AbstractFiltersController(PagedResourcesAssembler%3CObject%3E pagedResourcesAssembler,%0A            @NonNull PredicateContextBuilderFactory predicateContextBuilderFactory, @NonNull FilterTreeBuilder filterTreeBuilder) %7B%0A        super(pagedResourcesAssembler);%0A        this.predicateContextBuilderFactory = predicateContextBuilderFactory;%0A        this.filterTreeBuilder = filterTreeBuilder;%0A    %7D%0A%0A    protected void addFilters(MultiValueMap%3CString, Object%3E parameters, PredicateContextBuilder builder) %7B%0A        List%3CObject%3E filterParams = parameters.get(FILTERS_PARAM_NAME);%0A        for (Object filterParam : filterParams) %7B%0A            FilterPart filterTree = filterTreeBuilder.from((String) filterParam);%0A            builder.withFilterTree(filterTree);%0A        %7D%0A    %7D%0A%0A    protected Iterable%3CObject%3E getResult(PredicateContextRepositoryInvoker invoker, PredicateContext predicateContext,%0A            DefaultedPageable pageable, QSort sort, boolean addDefaultPageable) %7B%0A        Iterable%3CObject%3E result;%0A        if (pageable.getPageable() == null %7C%7C (pageable.isDefault() && !addDefaultPageable))%0A            result = invoker.invokeFindAll(predicateContext, sort);%0A        else%0A            result = invoker.invokeFindAll(predicateContext, pageable.getPageable());%0A        return result;%0A    %7D%0A%0A    protected boolean checkIfAddDefaultPageable(boolean entityInfoPageable, boolean searchPredicatePageable) %7B%0A        if (!entityInfoPageable)%0A            return false;%0A        return searchPredicatePageable;%0A    %7D%0A%0A    protected boolean checkIfAddDefaultPageable(boolean entityInfoPageable) %7B%0A        return checkIfAddDefaultPageable(entityInfoPageable, true);%0A    %7D%0A%7D%0A

Create AbstractFiltersController that extends AbstractFiltersController and adds common methods implementation