aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-01-24 10:38:57 +0200
committerGitHub <noreply@github.com>2017-01-24 10:38:57 +0200
commit19b42d6ee408d0711ed6e13c3d833b487e36e834 (patch)
tree0e41b9f0bbe621da79e2cdb73ac4e34146245a9f /server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java
parent47f068408dd6b98deaf65bbb5d59607c4bc8ca35 (diff)
downloadvaadin-framework-19b42d6ee408d0711ed6e13c3d833b487e36e834.tar.gz
vaadin-framework-19b42d6ee408d0711ed6e13c3d833b487e36e834.zip
Unify container wrapping (#8312)
* Method names unified to withXyzFilter * withConfigurableFilter moved to DataProvider * Remove DataProviderWrapper.convert since it does the same as DataProvider.withConvertedFilter * Make javadocs slightly more consistent * Make type parameters consistent
Diffstat (limited to 'server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java')
-rw-r--r--server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java b/server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java
index 199d0b64fe..f20b22fa17 100644
--- a/server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java
+++ b/server/src/main/java/com/vaadin/data/provider/BackEndDataProvider.java
@@ -18,8 +18,6 @@ package com.vaadin.data.provider;
import java.util.Collections;
import java.util.List;
-import com.vaadin.server.SerializableBiFunction;
-
/**
* A data provider that lazy loads items from a back end.
*
@@ -74,43 +72,4 @@ public interface BackEndDataProvider<T, F> extends DataProvider<T, F> {
return false;
}
- /**
- * Wraps this data provider to create a data provider that supports
- * programmatically setting a filter that will be combined with a filter
- * provided through the query.
- *
- * @see #withConfigurableFilter()
- *
- * @param filterCombiner
- * a callback for combining and the configured filter with the
- * filter from the query to get a filter to pass to the wrapped
- * provider. Will only be called if the query contains a filter.
- *
- * @return a data provider with a configurable filter, not <code>null</code>
- */
- public default <C> ConfigurableFilterDataProvider<T, C, F> withConfigurableFilter(
- SerializableBiFunction<F, C, F> filterCombiner) {
- return new ConfigurableFilterDataProviderWrapper<T, C, F>(this) {
- @Override
- protected F combineFilters(F configuredFilter, C queryFilter) {
- return filterCombiner.apply(configuredFilter, queryFilter);
- }
- };
- }
-
- /**
- * Wraps this data provider to create a data provider that supports
- * programmatically setting a filter but no filtering through the query.
- *
- * @see #withConfigurableFilter(SerializableBiFunction)
- *
- * @return a data provider with a configurable filter, not <code>null</code>
- */
- public default ConfigurableFilterDataProvider<T, Void, F> withConfigurableFilter() {
- return withConfigurableFilter((configuredFilter, queryFilter) -> {
- assert queryFilter == null : "Filter from Void query must be null";
-
- return configuredFilter;
- });
- }
}