Package 

Interface FilterFactory

  • All Implemented Interfaces:
    java.io.Serializable

    
    public interface FilterFactory<F extends Object>
     implements Serializable
                        

    Used by filter components (such as NumberInterval) to create actual filter objects. The filters are expected to have properly implemented Any.equals, Any.hashCode and Any.toString, to allow for filter expression simplification (e.g. to remove non-unique filters from AND or OR expressions).

    The filter objects produced by this factory will be passed into Vaadin's DataProvider in the Query object.

    • Method Summary

      Modifier and Type Method Description
      abstract F and(Set<F> filters) ANDs given set of filters and returns a new filter.
      abstract F or(Set<F> filters) ORs given set of filters and returns a new filter.
      abstract F eq(String propertyName, Object value) Creates a filter which matches the value of given propertyName to given value.
      abstract F le(String propertyName, Object value) Creates a filter which accepts only such values of given propertyName which are less than or equal to given value.
      abstract F ge(String propertyName, Object value) Creates a filter which accepts only such values of given propertyName which are greater than or equal to given value.
      abstract F ilike(String propertyName, String value) Creates a filter which performs a case-insensitive substring matching of given propertyName to given value.
      F between(String propertyName, Object min, Object max) Creates a filter which accepts only such values of given propertyName which are greater than or equal to given min and less than or equal to given max.
      • Methods inherited from class java.io.Serializable

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

      • and

         abstract F and(Set<F> filters)

        ANDs given set of filters and returns a new filter.

        Parameters:
        filters - set of filters, may be empty.
      • or

         abstract F or(Set<F> filters)

        ORs given set of filters and returns a new filter.

        Parameters:
        filters - set of filters, may be empty.
      • eq

         abstract F eq(String propertyName, Object value)

        Creates a filter which matches the value of given propertyName to given value.

      • le

         abstract F le(String propertyName, Object value)

        Creates a filter which accepts only such values of given propertyName which are less than or equal to given value.

      • ge

         abstract F ge(String propertyName, Object value)

        Creates a filter which accepts only such values of given propertyName which are greater than or equal to given value.

      • ilike

         abstract F ilike(String propertyName, String value)

        Creates a filter which performs a case-insensitive substring matching of given propertyName to given value.

        Parameters:
        value - not empty; matching rows must contain this string.
      • between

         F between(String propertyName, Object min, Object max)

        Creates a filter which accepts only such values of given propertyName which are greater than or equal to given min and less than or equal to given max.