Class FilterUtils

java.lang.Object
com.vaadin.flow.data.provider.FilterUtils

public final class FilterUtils extends Object
Internal filter related utilities for data provider.
Since:
1.3
Author:
Vaadin Ltd
  • Method Summary

    Modifier and Type
    Method
    Description
    static <F, Q, C> F
    combineFilters(com.vaadin.flow.function.SerializableBiFunction<Q,C,F> filterCombiner, Q queryFilter, C configuredFilter)
    Combines the configured filter and the filter from the query into one filter instance that can be passed to the wrapped data provider using the filterCombiner.
    static <T, C, F> F
    convertFilter(com.vaadin.flow.function.SerializableFunction<C,F> filterConverter, Query<T,C> query)
    Gets the filter converted from a query filter by the filterConverter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • combineFilters

      public static <F, Q, C> F combineFilters(com.vaadin.flow.function.SerializableBiFunction<Q,C,F> filterCombiner, Q queryFilter, C configuredFilter)
      Combines the configured filter and the filter from the query into one filter instance that can be passed to the wrapped data provider using the filterCombiner.
      Type Parameters:
      F - the filter type of the wrapped data provider
      Q - the query filter type
      C - the configurable filter type
      Parameters:
      filterCombiner - a filters combiner
      queryFilter - a query filter
      configuredFilter - a configured filter
      Returns:
      a filters combination
    • convertFilter

      public static <T, C, F> F convertFilter(com.vaadin.flow.function.SerializableFunction<C,F> filterConverter, Query<T,C> query)
      Gets the filter converted from a query filter by the filterConverter.
      Type Parameters:
      T - data type
      C - the filter type that the wrapped data provider accepts; typically provided by a Component
      F - the filter type of data provider
      Parameters:
      filterConverter - callback that converts the filter in the query of the wrapped data provider into a filter supported by this data provider. Will only be called if the query contains a filter. Not null
      query - a query with a filter to convert
      Returns:
      a converted filter, may be null if the query has no filter