Class JoinFilter
java.lang.Object
com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
com.vaadin.featurepack.data.jpacontainer.filter.JoinFilter
- All Implemented Interfaces:
Container.Filter,Serializable
This filter allows you to implement filtering on joined tables using
Hibernate, which lacks support for automatic joins. EclipseLink supports
automatic joins, which allows you to filter by e.g.
new Equal("skills.skill", s), while Hibernate requires you to do
the same using this filter e.g.
new JoinFilter("skills", new Equal("skill", s))- See Also:
-
Field Summary
Fields inherited from class com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
filters -
Constructor Summary
ConstructorsConstructorDescriptionJoinFilter(String joinProperty, Container.Filter... filters) Constructs a HibernateJoin filter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanpassesFilter(Object itemId, Item item) Check if an item passes the filter (in-memory filtering).Methods inherited from class com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
appliesToProperty, equals, getFilters, hashCode
-
Constructor Details
-
JoinFilter
Constructs a HibernateJoin filter.- Parameters:
joinProperty- the property that should be joinedfilters- a set of filters filtering on the joined property. By default all filters much pass for the item to be matched.
-
-
Method Details
-
getJoinProperty
- Returns:
- the property that is joined on
-
passesFilter
Description copied from interface:Container.FilterCheck 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
-