Class 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 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,
                               java.util.Map<java.lang.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 java.util.Set<Attribute<?>> getAttributes()
        Returns all search attributes referenced by this instance
        Specified by:
        getAttributes in class BaseCriteria