Class AndFilter<T>
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter<T>
org.eclipse.persistence.jpa.jpql.tools.utility.filter.AndFilter<T>
- All Implemented Interfaces:
Serializable,Cloneable,Filter<T>
This filter will "accept" any object that is accept by both of the specified wrapped filters. The
first filter will always be evaluated, while the second will only be evaluated if necessary.
- Since:
- 2.3
- Version:
- 2.4
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter
filter1, filter2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether the specified object is "accepted" by the filter.static <T> Filter<T> Creates a newANDFilterthat will "accept" any object that is accept by all of the specified filters.clone()protected StringReturns a string representation of the filter's operator.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter
equals, getFilter1, getFilter2, hashCode, toString
-
Constructor Details
-
AndFilter
Creates a newAndFilterthat will "accept" any object that is accept by both of the specified wrapped filters.- Parameters:
filter1- The firstFilterthat might "accept" any objectfilter2- The secondFilterthat might "accept" any object
-
-
Method Details
-
and
Creates a newANDFilterthat will "accept" any object that is accept by all of the specified filters.- Parameters:
filters- The list offiltersencapsulated by a chain ofAndFilters- Returns:
- A new chain of
AndFiltersthat will "accept" any object when allfiltersaccepts the object
-
accept
Description copied from interface:FilterDetermines whether the specified object is "accepted" by the filter. The semantics of "accept" is determined by the contract between the client and the server.- Parameters:
value- The value to filter- Returns:
trueif the given value is "accepted" by this filter;falseif it was "rejected"
-
clone
- Overrides:
clonein classCompoundFilter<T>
-
operatorString
Description copied from class:CompoundFilterReturns a string representation of the filter's operator.- Specified by:
operatorStringin classCompoundFilter<T>- Returns:
- The string value of the operator
-