ehcache

net.sf.ehcache.search.expression
Class Or

java.lang.Object
  extended by net.sf.ehcache.search.expression.BaseCriteria
      extended by net.sf.ehcache.search.expression.Or
All Implemented Interfaces:
Criteria

public class Or
extends BaseCriteria

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

Author:
teck

Constructor Summary
Or(Criteria lhs, Criteria rhs)
          Simple constructor for two criteria
 
Method Summary
 boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
          Test this criteria against a cache element
 Set<Attribute<?>> getAttributes()
          Returns all search attributes referenced by this instance
 Criteria[] getCriterion()
          Return criteria
 Criteria or(Criteria other)
          Produce a criteria that is the boolean "or" of this and the given other criteria
 
Methods inherited from class net.sf.ehcache.search.expression.BaseCriteria
and, getExtractor, not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Or

public Or(Criteria lhs,
          Criteria rhs)
Simple constructor for two criteria

Parameters:
lhs - the left hand side of the "or" expression
rhs - the right hand side of the "or" expression
Method Detail

or

public Criteria or(Criteria other)
Produce a criteria that is the boolean "or" of this and the given other criteria

Specified by:
or in interface Criteria
Overrides:
or in class BaseCriteria
Returns:
or criteria

getCriterion

public Criteria[] getCriterion()
Return criteria

Returns:
criteria

execute

public boolean execute(Element e,
                       Map<String,AttributeExtractor> attributeExtractors)
Test this criteria against a cache element

Parameters:
e - cache element
attributeExtractors - map of attribute extractors to attribute value names
Returns:
true if the criteria matches this element

getAttributes

public Set<Attribute<?>> getAttributes()
Returns all search attributes referenced by this instance

Specified by:
getAttributes in class BaseCriteria

ehcache

Copyright 2001-2015, Terracotta, Inc.