java.lang.Object
com.vaadin.featurepack.data.util.filter.AbstractJunctionFilter
com.vaadin.featurepack.data.jpacontainer.filter.JoinFilter
All Implemented Interfaces:
Container.Filter, Serializable

public class JoinFilter extends AbstractJunctionFilter
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:
  • Constructor Details

    • JoinFilter

      public JoinFilter(String joinProperty, Container.Filter... filters)
      Constructs a HibernateJoin filter.
      Parameters:
      joinProperty - the property that should be joined
      filters - a set of filters filtering on the joined property. By default all filters much pass for the item to be matched.
  • Method Details

    • getJoinProperty

      public String getJoinProperty()
      Returns:
      the property that is joined on
    • passesFilter

      public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException
      Description copied from interface: Container.Filter
      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 container
      item - 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