Top Description Inners Fields Constructors Methods
net.sf.ehcache.config

public Class SearchAttribute

extends Object
Class Inheritance
Imports
java.util.Properties, .Set, net.sf.ehcache.config.generator.model.NodeElement, .SimpleNodeAttribute, .SimpleNodeElement, net.sf.ehcache.search.attribute.AttributeExtractor, .AttributeType, .JavaBeanAttributeExtractor, .ReflectionAttributeExtractor, net.sf.ehcache.util.ClassLoaderUtil, .PropertyUtil

A cache search attribute. Search attributes must have a name and optionally an expression or class set (if neither is set then this implies java bean style)
Author
teck

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String
private String
private Class<?>
private String
private static final Class<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public NodeElement

Returns:

generated config element for this search attribute
asConfigElement
(NodeElement
the enclosing parent config element
parent
)

Create a generated config element node for this search attribute definition

public SearchAttribute

Returns:

this
className
(String
attribute extractor class
className
)

Set the attribute extractor class name

public AttributeExtractor
constructExtractor(ClassLoader loader)

Construct the extractor for this attribute configuration

public SearchAttribute

Returns:

this
expression
(String
attribute expression
expression
)

Set the attribute expression

public String
getClassName()

Get the extractor class name

public String
getExpression()

Get the attribute expression

public String
getName()

Get the attribute name

pack-priv Class<?>
getType(ClassLoader loader)

Get actual attribute type

public String

Returns:

String representation of attribute type
getTypeName
()

public SearchAttribute

Returns:

this
name
(String name)

Set the attribute name

public SearchAttribute

Returns:

this
properties
(String props)

Set the extractor properties

public SearchAttribute

Returns:

this
propertySeparator
(String sep)

Set the extractor properties separator

public void
setClass(String className)

Set the extractor class for this attribute.

public void
setExpression(String expression)

Set the attribute expression.

public void
setName(String name)

Set the attribute name

public void
setProperties(String props)

Set the extractor properties

public void
setPropertySeparator(String sep)

Set the extractor properties separator

public void
setType(String type)

Set optional attribute type

public void
setType(Class<?> type)

Set optional attribute type

public SearchAttribute

Returns:

this
type
(String type)

Set optional attribute type

public SearchAttribute

Returns:

this
type
(Class<?> type)

Set optional attribute type

private Class<?>
validateType(String attrType, ClassLoader loader)

private String
validateType(Class<?> attrType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classNameback to summary
private String className
expressionback to summary
private String expression
nameback to summary
private String name
propertiesback to summary
private String properties
propertySeparatorback to summary
private String propertySeparator
typeback to summary
private Class<?> type
typeNameback to summary
private String typeName
UNRESOLVEDback to summary
private static final Class<?> UNRESOLVED

Constructor Detail

SearchAttributeback to summary
public SearchAttribute()

Method Detail

asConfigElementback to summary
public NodeElement asConfigElement(NodeElement parent)

Create a generated config element node for this search attribute definition

Parameters
parent:NodeElement

the enclosing parent config element

Returns:NodeElement

generated config element for this search attribute

classNameback to summary
public SearchAttribute className(String className)

Set the attribute extractor class name

Parameters
className:String

attribute extractor class

Returns:SearchAttribute

this

constructExtractorback to summary
public AttributeExtractor constructExtractor(ClassLoader loader)

Construct the extractor for this attribute configuration

expressionback to summary
public SearchAttribute expression(String expression)

Set the attribute expression

Parameters
expression:String

attribute expression

Returns:SearchAttribute

this

getClassNameback to summary
public String getClassName()

Get the extractor class name

getExpressionback to summary
public String getExpression()

Get the attribute expression

getNameback to summary
public String getName()

Get the attribute name

getTypeback to summary
pack-priv Class<?> getType(ClassLoader loader)

Get actual attribute type

getTypeNameback to summary
public String getTypeName()
Returns:String

String representation of attribute type

nameback to summary
public SearchAttribute name(String name)

Set the attribute name

Returns:SearchAttribute

this

propertiesback to summary
public SearchAttribute properties(String props)

Set the extractor properties

Returns:SearchAttribute

this

propertySeparatorback to summary
public SearchAttribute propertySeparator(String sep)

Set the extractor properties separator

Returns:SearchAttribute

this

setClassback to summary
public void setClass(String className)

Set the extractor class for this attribute. This class must be available at runtime and must implement AttributeExtractor

setExpressionback to summary
public void setExpression(String expression)

Set the attribute expression. See ReflectionAttributeExtractor for more information

setNameback to summary
public void setName(String name)

Set the attribute name

setPropertiesback to summary
public void setProperties(String props)

Set the extractor properties

setPropertySeparatorback to summary
public void setPropertySeparator(String sep)

Set the extractor properties separator

setTypeback to summary
public void setType(String type)

Set optional attribute type

setTypeback to summary
public void setType(Class<?> type)

Set optional attribute type

typeback to summary
public SearchAttribute type(String type)

Set optional attribute type

Returns:SearchAttribute

this

typeback to summary
public SearchAttribute type(Class<?> type)

Set optional attribute type

Returns:SearchAttribute

this

validateTypeback to summary
private Class<?> validateType(String attrType, ClassLoader loader)
validateTypeback to summary
private String validateType(Class<?> attrType)
net.sf.ehcache.config back to summary

private Class SearchAttribute.UnresolvedType

extends Object
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

UnresolvedTypeback to summary
private UnresolvedType()