Package com.vaadin.featurepack.data
Interface Container.Filter
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractJunctionFilter,And,Between,Compare,Compare.Equal,Compare.Greater,Compare.GreaterOrEqual,Compare.Less,Compare.LessOrEqual,IsNull,JoinFilter,Like,Not,Or,SimpleStringFilter
- Enclosing interface:
Container
Filter interface for container filtering.
If a filter does not support in-memory filtering,
should throw
invalid reference
#passesFilter(Item)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
and
invalid reference
#equals(Object)
correctly to avoid duplicate filter registrations
etc.invalid reference
#hashCode()
- Since:
- 6.6
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanappliesToProperty(Object propertyId) Check if a change in the value of a property can affect the filtering result.booleanpassesFilter(Object itemId, Item item) Check if an item passes the filter (in-memory filtering).
-
Method Details
-
passesFilter
Check if an item passes the filter (in-memory filtering).- Parameters:
itemId- identifier of the item being filtered; may be null when the item is being added to the containeritem- the item being filtered- Returns:
- true if the item is accepted by this filter
- Throws:
UnsupportedOperationException- if the filter cannot be used for in-memory filtering
-
appliesToProperty
Check if a change in the value of a property can affect the filtering result. May always return true, at the cost of performance. If the filter cannot determine whether it may depend on the property or not, should return true.- Parameters:
propertyId-- Returns:
- true if the filtering result may/does change based on changes to the property identified by propertyId
-