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

public Class InCollection

extends BaseCriteria
Class Inheritance
Imports
java.util.Collection, .Collections, .Map, .Set, net.sf.ehcache.Element, net.sf.ehcache.search.Attribute, .SearchException, net.sf.ehcache.search.attribute.AttributeExtractor, .AttributeType

Criteria for inclusion in a given Collection (presumably a Set) of values
Author
teck

Field Summary

Modifier and TypeField and Description
private final String
private final boolean
private final AttributeType
private final Collection<?>

Constructor Summary

AccessConstructor and Description
public
InCollection(String
attribute name
attributeName
,
Collection<?> values)

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:

String attribute name
getAttributeName
()

Return attributeName

public Set<Attribute<?>>
getAttributes()

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

Returns all search attributes referenced by this instance
public Collection<?>

Returns:

Collection<?> values
values
()

Return values.

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

Field Detail

attributeNameback to summary
private final String attributeName
emptyback to summary
private final boolean empty
typeback to summary
private final AttributeType type
valuesback to summary
private final Collection<?> values

Constructor Detail

InCollectionback to summary
public InCollection(String attributeName, Collection<?> values)

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()

Return attributeName

Returns:String

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
valuesback to summary
public Collection<?> values()

Return values.

Returns:Collection<?>

Collection<?> values

verifyCommonTypeback to summary
private AttributeType verifyCommonType()