net.sf.ehcache.search.attribute
Class KeyObjectAttributeExtractor
java.lang.Object
  
net.sf.ehcache.search.attribute.KeyObjectAttributeExtractor
- All Implemented Interfaces: 
 - Serializable, AttributeExtractor
 
public class KeyObjectAttributeExtractor
- extends Object
- implements AttributeExtractor
  
Attempt to use the element key object itself as a search attribute. If the key is not a legal type it is omitted
- Author:
 
  - teck
 
- See Also:
 - Serialized Form
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
KeyObjectAttributeExtractor
public KeyObjectAttributeExtractor()
attributeFor
public Object attributeFor(Element element,
                           String attributeName)
                    throws AttributeExtractorException
- Extract the attribute value. The instance returned from this method must
 be one of:
 
 - java.lang.Boolean
 
 - java.lang.Byte
 
 - java.lang.Character
 
 - java.lang.Double
 
 - java.lang.Float
 
 - java.lang.Integer
 
 - java.lang.Long
 
 - java.lang.Short
 
 - java.lang.String
 
 - java.util.Date
 
 - java.sql.Date
 
 - java.lang.Enum
 
 
 
 NOTE: null is a legal return here as well indicating that this attribute will not be available for the given element
- Specified by:
 attributeFor in interface AttributeExtractor
 
- Parameters:
 element - the cache element to inspectattributeName - the name of the requested attribute
- Returns:
 - the attribute value
 - Throws:
 AttributeExtractorException - if the attribute cannot be found or extracted
 
 
Copyright 2001-2014, Terracotta, Inc.