F - the type of the filter objects. Every database access type or DataProvider implementation may have different filters;
for example VoK-ORM defines its own hierarchy of filters.public FilterFactory<F>
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.
| Modifier and Type | Interface and Description |
|---|---|
static class |
FilterFactory.DefaultImpls
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).
|
| Modifier and Type | Method and Description |
|---|---|
F |
and(java.util.Set<? extends F> filters)
ANDs given set of filters and returns a new filter.
|
F |
between(java.lang.String propertyName,
java.lang.Object min,
java.lang.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.
|
F |
eq(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which matches the value of given propertyName to given value.
|
F |
ge(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which accepts only such values of given propertyName which are greater than or equal to given value.
|
F |
ilike(java.lang.String propertyName,
java.lang.String value)
Creates a filter which performs a case-insensitive substring matching of given propertyName to given value.
|
F |
le(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which accepts only such values of given propertyName which are less than or equal to given value.
|
F |
or(java.util.Set<? extends F> filters)
ORs given set of filters and returns a new filter.
|
F and(java.util.Set<? extends F> filters)
ANDs given set of filters and returns a new filter.
filters - set of filters, may be empty.null when the filter set is empty.F or(java.util.Set<? extends F> filters)
ORs given set of filters and returns a new filter.
filters - set of filters, may be empty.null when the filter set is empty.F eq(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which matches the value of given propertyName to given value.
F le(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which accepts only such values of given propertyName which are less than or equal to given value.
F ge(java.lang.String propertyName,
java.lang.Object value)
Creates a filter which accepts only such values of given propertyName which are greater than or equal to given value.
F ilike(java.lang.String propertyName,
java.lang.String value)
Creates a filter which performs a case-insensitive substring matching of given propertyName to given value.
value - not empty; matching rows must contain this string. To emit SQL LIKE statement you need to prepend and append '%' to this string.F between(java.lang.String propertyName,
java.lang.Object min,
java.lang.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.