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

public Class EqualTo

extends BaseCriteria
Class Inheritance
Known Direct Subclasses
net.sf.ehcache.search.expression.NotEqualTo
Imports
java.util.Collections, .Map, .Set, net.sf.ehcache.Element, net.sf.ehcache.search.Attribute, .SearchException, net.sf.ehcache.search.attribute.AttributeExtractor, .AttributeType

A comparison operator meaning Java "equals to" condition
Author
teck

Field Summary

Modifier and TypeField and Description
private final String
private final AttributeType
private final Object

Constructor Summary

AccessConstructor and Description
public
EqualTo(String
attribute name
attributeName
,
Object value)

Constructor

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 String

Returns:

attribute name.
getAttributeName
()

Get attribute name.

public Set<Attribute<?>>
getAttributes()

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

Returns all search attributes referenced by this instance
public AttributeType

Returns:

attribute type.
getType
()

Get attribute type.

public Object

Returns:

attribute value
getValue
()

Get attribute value.

Inherited from net.sf.ehcache.search.expression.BaseCriteria:
andgetExtractornotor

Field Detail

attributeNameback to summary
private final String attributeName
typeback to summary
private final AttributeType type
valueback to summary
private final Object value

Constructor Detail

EqualToback to summary
public EqualTo(String attributeName, Object value)

Constructor

Parameters
attributeName:String

attribute name

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

getAttributeNameback to summary
public String getAttributeName()

Get attribute name.

Returns:String

attribute name.

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

Annotations
@Override
getTypeback to summary
public AttributeType getType()

Get attribute type.

Returns:AttributeType

attribute type.

getValueback to summary
public Object getValue()

Get attribute value.

Returns:Object

attribute value