use of de.metas.ui.web.document.filter.DocumentFilter.Builder in project metasfresh-webui-api by metasfresh.
the class SqlViewFactory method createAutoFilter.
private static DocumentFilter createAutoFilter(final DocumentFilterDescriptor filterDescriptor) {
if (!filterDescriptor.isAutoFilter()) {
throw new AdempiereException("Not an auto filter: " + filterDescriptor);
}
final Builder filterBuilder = DocumentFilter.builder().setFilterId(filterDescriptor.getFilterId());
filterDescriptor.getParameters().stream().filter(DocumentFilterParamDescriptor::isAutoFilter).map(SqlViewFactory::createAutoFilterParam).forEach(filterBuilder::addParameter);
return filterBuilder.build();
}
Aggregations