java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter<T>
All Implemented Interfaces:
Serializable, Cloneable, Filter<T>
Direct Known Subclasses:
AndFilter

public abstract class CompoundFilter<T> extends Object implements Filter<T>, Cloneable, Serializable
This filter provides a simple framework for combining the behavior of a pair of filters.
Since:
2.3
Version:
2.3
See Also:
  • Field Details

    • filter1

      protected final transient Filter<T> filter1
      The first Filter used to accept the value.
    • filter2

      protected final transient Filter<T> filter2
      The second Filter used to accept the value.
  • Constructor Details

    • CompoundFilter

      protected CompoundFilter(Filter<T> filter1, Filter<T> filter2)
      Creates a new CompoundFilter that will "accept" any object that is accept by both of the specified wrapped filters.
      Parameters:
      filter1 - The first Filter used to accept the value
      filter2 - The second Filter used to accept the value
  • Method Details

    • clone

      public CompoundFilter<T> clone()
      Overrides:
      clone in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • getFilter1

      public Filter<T> getFilter1()
      Returns the left Filter of this compound filter.
      Returns:
      The first Filter
    • getFilter2

      public Filter<T> getFilter2()
      Returns the second Filter of this compound filter.
      Returns:
      The second Filter
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • operatorString

      protected abstract String operatorString()
      Returns a string representation of the filter's operator.
      Returns:
      The string value of the operator
    • toString

      public String toString()
      Overrides:
      toString in class Object