public static interface Container.Filter extends Serializable
If a filter does not support in-memory filtering,
#passesFilter(Item)
should throw
UnsupportedOperationException
.
Lazy containers must be able to map filters to their internal representation (e.g. SQL or JPA 2.0 Criteria).
An UnsupportedFilterException
can be thrown by the container if a
particular filter is not supported by the container.
An Container.Filter
should implement #equals(Object)
and
#hashCode()
correctly to avoid duplicate filter registrations
etc.
Container.Filterable
Modifier and Type | Method and Description |
---|---|
boolean |
appliesToProperty(Object propertyId)
Check if a change in the value of a property can affect the filtering
result.
|
boolean |
passesFilter(Object itemId,
Item item)
Check if an item passes the filter (in-memory filtering).
|
boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException
itemId
- identifier of the item being filtered; may be null when
the item is being added to the containeritem
- the item being filteredUnsupportedOperationException
- if the filter cannot be used for in-memory filteringboolean appliesToProperty(Object propertyId)
propertyId
- Copyright © 2017 Vaadin Ltd. All rights reserved.