Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.internal.jpql.util
Class AndFilter<T>

java.lang.Object
  extended by org.eclipse.persistence.jpa.internal.jpql.util.CompoundFilter<T>
      extended by org.eclipse.persistence.jpa.internal.jpql.util.AndFilter<T>

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Filter<T>

public class AndFilter<T>
extends CompoundFilter<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.3
Author:
Brian Vosburgh
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          The version number of this class which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization.

 

Fields inherited from class org.eclipse.persistence.jpa.internal.jpql.util.CompoundFilter
filter1, filter2

 

Constructor Summary
AndFilter(Filter<T> filter1, Filter<T> filter2)
          Creates a new AndFilter that will "accept" any object that is accept by both of the specified wrapped filters.

 

Method Summary
 boolean accept(T value)
          Determines whether the specified object is "accepted" by the filter.
static
<T> Filter<T>
and(Filter<T>... filters)
          Creates a new ANDFilter that will "accept" any object that is accept by all of the specified filters.
 AndFilter<T> clone()
          
protected  java.lang.String operatorString()
          Returns a string representation of the filter's operator.

 

Methods inherited from class org.eclipse.persistence.jpa.internal.jpql.util.CompoundFilter
equals, getFilter1, getFilter2, hashCode, toString

 

Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

 

Field Detail

serialVersionUID

private static final long serialVersionUID
The version number of this class which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization.
See Also:
Constant Field Values

Constructor Detail

AndFilter

public AndFilter(Filter<T> filter1,
                 Filter<T> filter2)
Creates a new AndFilter that will "accept" any object that is accept by both of the specified wrapped filters.
Parameters:
filter1 - The first Filter that might "accept" any object
filter2 - The second Filter that might "accept" any object

Method Detail

and

public static <T> Filter<T> and(Filter<T>... filters)
Creates a new ANDFilter that will "accept" any object that is accept by all of the specified filters.
Parameters:
filters - The list of Filters encapsulated by a chain of AndFilters
Returns:
A new chain of ORFilters that will "accept" any object when all Filters accepts the object

accept

public boolean accept(T value)
Determines 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:
true if the given value is "accepted" by this filter; false if it was "rejected".

clone

public AndFilter<T> clone()
Overrides:
clone in class CompoundFilter<T>

operatorString

protected java.lang.String operatorString()
Returns a string representation of the filter's operator.
Specified by:
operatorString in class CompoundFilter<T>
Returns:
The string value of the operator

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.