use of com.haulmont.cuba.core.global.filter.DenyingClause in project cuba by cuba-platform.
the class FilterDelegateImpl method setDatasource.
@Override
public void setDatasource(CollectionDatasource datasource) {
this.datasource = datasource;
this.dsQueryFilter = datasource.getQueryFilter();
if (getResultingManualApplyRequired()) {
// set initial denying condition to get empty datasource before explicit filter applying
QueryFilter queryFilter = new QueryFilter(new DenyingClause());
if (dsQueryFilter != null) {
queryFilter = QueryFilter.merge(dsQueryFilter, queryFilter);
}
datasource.setQueryFilter(queryFilter);
}
if (datasource instanceof CollectionDatasource.Lazy || datasource instanceof HierarchicalDatasource) {
setUseMaxResults(false);
} else if (useMaxResults) {
initMaxResults();
}
if (ftsSwitch != null && !isEntityAvailableForFts()) {
controlsLayout.remove(ftsSwitch);
}
}
Aggregations