java.lang.Object
com.vaadin.featurepack.data.jpacontainer.filter.Filters

public final class Filters extends Object
Utility class for creating filter instances.
Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
  • Method Details

    • isNull

      public static Container.Filter isNull(Object propertyId)
      Creates a new filter that accepts all items whose value of propertyId is null.
    • isNotNull

      public static Container.Filter isNotNull(Object propertyId)
      Creates a new filter that accepts all items whose value of propertyId is not null.
    • isEmpty

      public static Container.Filter isEmpty(Object propertyId)
      Creates a new filter that accepts all items whose value of propertyId is empty.
    • isNotEmpty

      public static Container.Filter isNotEmpty(Object propertyId)
      Creates a new filter that accepts all items whose value of propertyId is not empty.
    • eq

      public static Container.Filter eq(Object propertyId, String value, boolean caseSensitive)
      Creates a new filter that accepts all items whose value of propertyId is equal to value.
    • like

      public static Container.Filter like(Object propertyId, String value, boolean caseSensitive)
      Creates a new filter that accepts all items whose value of propertyId matches value. The precent-sign (%) may be used as wildcard.
    • eq

      public static Container.Filter eq(Object propertyId, Object value)
      Creates a new filter that accepts all items whose value of propertyId is equal to value.
    • gteq

      public static Container.Filter gteq(Object propertyId, Object value)
      Creates a new filter that accepts all items whose value of propertyId is greater than or equal to value.
    • gt

      public static Container.Filter gt(Object propertyId, Object value)
      Creates a new filter that accepts all items whose value of propertyId is greater than value.
    • lteq

      public static Container.Filter lteq(Object propertyId, Object value)
      Creates a new filter that accepts all items whose value of propertyId is less than or equal to value.
    • lt

      public static Container.Filter lt(Object propertyId, Object value)
      Creates a new filter that accepts all items whose value of propertyId is less than value.
    • between

      public static Container.Filter between(Object propertyId, Comparable<?> startingPoint, Comparable<?> endingPoint)
      Creates a new filter that accepts all items whose value of propertyId is between startingPoint and endingPoint.
    • between

      public static Container.Filter between(Object propertyId, Object startingPoint, Object endingPoint, boolean includeStartingPoint, boolean includeEndingPoint)
    • betweenInclusive

      public static Container.Filter betweenInclusive(Object propertyId, Object startingPoint, Object endingPoint)
      Creates a new filter that accepts all items whose value of propertyId is between startingPoint (inclusive) and endingPoint (inclusive).
    • betweenExlusive

      public static Container.Filter betweenExlusive(Object propertyId, Object startingPoint, Object endingPoint)
      Creates a new filter that accepts all items whose value of propertyId is between startingPoint (exclusive) and endingPoint (exclusive).
    • outside

      public static Container.Filter outside(Object propertyId, Object startingPoint, Object endingPoint, boolean includeStartingPoint, boolean includeEndingPoint)
      Creates a new filter that accepts all items whose value of propertyId is outside startingPoint and endingPoint.
    • outsideInclusive

      public static Container.Filter outsideInclusive(Object propertyId, Object startingPoint, Object endingPoint)
      Creates a new filter that accepts all items whose value of propertyId is outside startingPoint (inclusive) and endingPoint (inclusive).
    • outsideExclusive

      public static Container.Filter outsideExclusive(Object propertyId, Object startingPoint, Object endingPoint)
      Creates a new filter that accepts all items whose value of propertyId is outside startingPoint (exclusive) and endingPoint (exclusive).
    • not

      public static Container.Filter not(Container.Filter filter)
      Creates a filter that negates filter.
    • and

      public static And and(Container.Filter... filters)
      Creates a filter that groups filters together in a single conjunction.
    • and

      public static And and(List<Container.Filter> filters)
      Creates a filter that groups filters together in a single conjunction.
    • or

      public static Or or(Container.Filter... filters)
      Creates a filter that groups filters together in a single disjunction.
    • or

      public static Or or(List<Container.Filter> filters)
      Creates a filter that groups filters together in a single disjunction.
    • joinFilter

      public static JoinFilter joinFilter(String joinProperty, Container.Filter... filters)
      Creates a filter that applies filters (as a conjunction) to the joined property joinProperty. This is only needed for Hibernate, as EclipseLink implicitly joins on nested properties.