Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.utility.filter

public Class AndFilter<T>

extends CompoundFilter<T>
Class Inheritance
Annotations
@SuppressWarnings:nls
Imports
org.eclipse.persistence.jpa.jpql.utility.filter.Filter, .NullFilter

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

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Hides org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.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.
Inherited from org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter:
filter1filter2

Constructor Summary

AccessConstructor and Description
public
AndFilter(Filter<T>
The first Filter that might "accept" any object
filter1
,
Filter<T>
The second Filter that might "accept" any object
filter2
)

Creates a new AndFilter that will "accept" any object that is accept by both of the specified wrapped filters.

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(T
The value to filter
value
)

Implements org.eclipse.persistence.jpa.jpql.utility.filter.Filter.accept.

Determines whether the specified object is "accepted" by the filter.
public static <T> Filter<T>

Returns:

A new chain of AndFilters that will "accept" any object when all filters accepts the object
and
(Filter<T>...
The list of filters encapsulated by a chain of AndFilters
filters
)

Creates a new ANDFilter that will "accept" any object that is accept by all of the specified filters.

public AndFilter<T>
clone()

Overrides org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.clone.

Creates and returns a copy of this object.
protected String
operatorString()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.operatorString.

Returns a string representation of the filter's operator.
Inherited from org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter:
equalsgetFilter1getFilter2hashCodetoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.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.

Constructor Detail

AndFilterback to summary
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:Filter<T>

The first Filter that might "accept" any object

filter2:Filter<T>

The second Filter that might "accept" any object

Method Detail

acceptback to summary
public boolean accept(T value)

Implements org.eclipse.persistence.jpa.jpql.utility.filter.Filter.accept.

Doc from org.eclipse.persistence.jpa.jpql.utility.filter.Filter.accept.

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:T

The value to filter

Returns:boolean

true if the given value is "accepted" by this filter; false if it was "rejected"

Annotations
@Override
andback to summary
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:Filter<T>[]

The list of filters encapsulated by a chain of AndFilters

Returns:Filter<T>

A new chain of AndFilters that will "accept" any object when all filters accepts the object

Annotations
@SafeVarargs
cloneback to summary
public AndFilter<T> clone()

Overrides org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:AndFilter<T>

a clone of this instance.

Annotations
@Override
operatorStringback to summary
protected String operatorString()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.operatorString.

Doc from org.eclipse.persistence.jpa.jpql.tools.utility.filter.CompoundFilter.operatorString.

Returns a string representation of the filter's operator.

Returns:String

The string value of the operator

Annotations
@Override