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 protected
CompoundFilter(Filter<T> filter1, Filter<T> filter2)
Creates a newCompoundFilter
that 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()
boolean
equals(java.lang.Object object)
Filter<T>
getFilter1()
Returns the leftFilter
of this compound filter.Filter<T>
getFilter2()
Returns the secondFilter
of this compound filter.int
hashCode()
protected abstract java.lang.String
operatorString()
Returns a string representation of the filter's operator.java.lang.String
toString()
-
-
-
Constructor Detail
-
CompoundFilter
protected CompoundFilter(Filter<T> filter1, Filter<T> filter2)
Creates a newCompoundFilter
that will "accept" any object that is accept by both of the specified wrapped filters.- Parameters:
filter1
- The firstFilter
used to accept the valuefilter2
- The secondFilter
used to accept the value
-
-
Method Detail
-
clone
public CompoundFilter<T> clone()
- Overrides:
clone
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
getFilter1
public Filter<T> getFilter1()
Returns the leftFilter
of this compound filter.- Returns:
- The first
Filter
-
getFilter2
public Filter<T> getFilter2()
Returns the secondFilter
of this compound filter.- Returns:
- The second
Filter
-
hashCode
public int hashCode()
- Overrides:
hashCode
in 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:
toString
in classjava.lang.Object
-
-