Top Description Fields Constructors Methods
net.sf.ehcache.search.expression

public Class Or

extends BaseCriteria
Class Inheritance
Imports
java.util.HashSet, .Map, .Set, net.sf.ehcache.Element, net.sf.ehcache.search.Attribute, net.sf.ehcache.search.attribute.AttributeExtractor

A search criteria composed of the logical "or" of two or more other criteria
Author
teck

Field Summary

Modifier and TypeField and Description
private final Criteria[]

Constructor Summary

AccessConstructor and Description
public
Or(Criteria
the left hand side of the "or" expression
lhs
,
Criteria
the right hand side of the "or" expression
rhs
)

Simple constructor for two criteria

private
Or(Or original, Criteria additional)

Method Summary

Modifier and TypeMethod and Description
public boolean
execute(Element
cache element
e
,
Map<String, AttributeExtractor>
map of attribute extractors to attribute value names
attributeExtractors
)

Implements net.sf.ehcache.search.expression.Criteria.execute.

Test this criteria against a cache element
public Set<Attribute<?>>
getAttributes()

Implements abstract net.sf.ehcache.search.expression.BaseCriteria.getAttributes.

Returns all search attributes referenced by this instance
public Criteria[]

Returns:

criteria
getCriterion
()

Return criteria

public Criteria
or(Criteria other)

Overrides net.sf.ehcache.search.expression.BaseCriteria.or.

Implements net.sf.ehcache.search.expression.Criteria.or.

Produce a criteria that is the boolean "or" of this and the given other criteria
Inherited from net.sf.ehcache.search.expression.BaseCriteria:
andgetExtractornot

Field Detail

criteriaback to summary
private final Criteria[] criteria

Constructor Detail

Orback to summary
public Or(Criteria lhs, Criteria rhs)

Simple constructor for two criteria

Parameters
lhs:Criteria

the left hand side of the "or" expression

rhs:Criteria

the right hand side of the "or" expression

Orback to summary
private Or(Or original, Criteria additional)

Method Detail

executeback to summary
public boolean execute(Element e, Map<String, AttributeExtractor> attributeExtractors)

Implements net.sf.ehcache.search.expression.Criteria.execute.

Doc from net.sf.ehcache.search.expression.Criteria.execute.

Test this criteria against a cache element

Parameters
e:Element

cache element

attributeExtractors:Map<String, AttributeExtractor>

map of attribute extractors to attribute value names

Returns:boolean

true if the criteria matches this element

getAttributesback to summary
public Set<Attribute<?>> getAttributes()

Implements abstract net.sf.ehcache.search.expression.BaseCriteria.getAttributes.

Doc from net.sf.ehcache.search.expression.BaseCriteria.getAttributes.

Returns all search attributes referenced by this instance

getCriterionback to summary
public Criteria[] getCriterion()

Return criteria

Returns:Criteria[]

criteria

orback to summary
public Criteria or(Criteria other)

Overrides net.sf.ehcache.search.expression.BaseCriteria.or.

Implements net.sf.ehcache.search.expression.Criteria.or.

Doc from net.sf.ehcache.search.expression.BaseCriteria.or.

Produce a criteria that is the boolean "or" of this and the given other criteria

Returns:Criteria

Doc from net.sf.ehcache.search.expression.Criteria.or.

or criteria

Annotations
@Override