Class CompoundFilter<T>
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter<T>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Filter<T>
- Direct Known Subclasses:
AndFilter
public abstract class CompoundFilter<T> extends java.lang.Object implements Filter<T>, java.lang.Cloneable, java.io.Serializable
This filter provides a simple framework for combining the behavior of a pair of filters.- Version:
- 2.3
- See Also:
- Serialized Form
- Since:
- 2.3
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompoundFilter(Filter<T> filter1, Filter<T> filter2)Creates a newCompoundFilterthat will "accept" any object that is accept by both of the specified wrapped filters.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CompoundFilter<T>clone()booleanequals(java.lang.Object object)Filter<T>getFilter1()Returns the leftFilterof this compound filter.Filter<T>getFilter2()Returns the secondFilterof this compound filter.inthashCode()protected abstract java.lang.StringoperatorString()Returns a string representation of the filter's operator.java.lang.StringtoString()
-
-
-
Constructor Detail
-
CompoundFilter
protected CompoundFilter(Filter<T> filter1, Filter<T> filter2)
Creates a newCompoundFilterthat will "accept" any object that is accept by both of the specified wrapped filters.- Parameters:
filter1- The firstFilterused to accept the valuefilter2- The secondFilterused to accept the value
-
-
Method Detail
-
clone
public CompoundFilter<T> clone()
- Overrides:
clonein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
getFilter1
public Filter<T> getFilter1()
Returns the leftFilterof this compound filter.- Returns:
- The first
Filter
-
getFilter2
public Filter<T> getFilter2()
Returns the secondFilterof this compound filter.- Returns:
- The second
Filter
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
operatorString
protected abstract java.lang.String operatorString()
Returns a string representation of the filter's operator.- Returns:
- The string value of the operator
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-