Interface AdvancedFilterable

All Known Subinterfaces:
EntityContainer<T>, HierarchicalEntityContainer<T>
All Known Implementing Classes:
AdvancedFilterableSupport, JPAContainer

public interface AdvancedFilterable
Container that supports a bit more advanced filtering than Container.Filterable . It has been designed to be used explicitly with JPA.
Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
  • Method Details

    • getFilterablePropertyIds

      Collection<Object> getFilterablePropertyIds()
      Gets the IDs of all the properties that are filterable.
      Returns:
      an unmodifiable collection of property IDs (never null).
    • isFilterable

      boolean isFilterable(Object propertyId)
      Checks if propertyId is filterable.
      Parameters:
      propertyId - the property ID to check (must not be null).
      Returns:
      true if the property is filterable, false otherwise.
    • getFilters

      List<Container.Filter> getFilters()
      Gets the list of filters to apply. The filters will be applied as a conjunction (i.e. AND) in the order they appear in.
      Returns:
      an unmodifiable list of filters (never null).
    • getAppliedFilters

      List<Container.Filter> getAppliedFilters()
      Gets the list of filters that are currently applied. If isApplyFiltersImmediately() returns true, this list will be the same as the one returned by getFilters().
      Returns:
      an unmodifiable list of filters (never null).
    • setApplyFiltersImmediately

      void setApplyFiltersImmediately(boolean applyFiltersImmediately)
      Sets whether the filters should be applied immediately when a filter is added or removed.
      Parameters:
      applyFiltersImmediately - true to apply filters immediately, false to apply when applyFilters() is called.
      See Also:
    • isApplyFiltersImmediately

      boolean isApplyFiltersImmediately()
      Returns whether the filters should be applied immediately when a filter is added or removed. Default is true. If false, applyFilters() has to be called to apply the filters and update the container.
      Returns:
      true if the filters are applied immediately, false otherwise.
      See Also:
    • applyFilters

      void applyFilters()
      Applies the filters to the data, possibly causing the items in the container to change.
      See Also:
    • hasUnappliedFilters

      boolean hasUnappliedFilters()
      Checks if there are filters that have not yet been applied, or applied filters that have been removed using
      invalid reference
      #removeAllFilters()
      or
      invalid reference
      #removeFilter(com.vaadin.addon.jpacontainer.Filter)
      .

      If isApplyFiltersImmediately() is true, this method always returns false.

      Returns:
      true if there are unapplied filters, false otherwise.
      See Also: