|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.search.expression.BaseCriteria net.sf.ehcache.search.expression.ComparableValue
public abstract class ComparableValue
Abstract base class for criteria involving Comparable
values
Constructor Summary | |
---|---|
ComparableValue(String attributeName,
AttributeType type)
Constructor |
|
ComparableValue(String attributeName,
Object value)
Constructor |
Method Summary | |
---|---|
boolean |
execute(Element e,
Map<String,AttributeExtractor> attributeExtractors)
Test this criteria against a cache element |
protected abstract boolean |
executeComparable(Comparable attributeValue)
Execute this criteria for the given Comparable attribute value |
protected abstract boolean |
executeComparableString(Comparable attributeValue)
Execute this criteria for the given Comparable strin type attribute value |
String |
getAttributeName()
Attribute name. |
AttributeType |
getType()
Attribute type. |
protected static int |
luceneStringCompare(String s1,
String s2)
Perform a Lucene compatible case insensitive string comparison. |
Methods inherited from class net.sf.ehcache.search.expression.BaseCriteria |
---|
and, getExtractor, not, or |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComparableValue(String attributeName, Object value)
attributeName
- attribute namevalue
- comparable value (used to infer type)public ComparableValue(String attributeName, AttributeType type)
attributeName
- attribute nametype
- the expeceted type for values evaluated by this criteriaMethod Detail |
---|
public String getAttributeName()
public AttributeType getType()
public boolean execute(Element e, Map<String,AttributeExtractor> attributeExtractors)
e
- cache elementattributeExtractors
- map of attribute extractors to attribute value names
protected abstract boolean executeComparable(Comparable attributeValue)
Comparable
attribute value
attributeValue
- Comparable attribute value
protected abstract boolean executeComparableString(Comparable attributeValue)
Comparable
strin type attribute value
attributeValue
- Comparable attribute value
protected static int luceneStringCompare(String s1, String s2)
s1
- first strings2
- second string
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |