org.compass.annotations
Annotation Type SearchableClassConverter


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface SearchableClassConverter

Specifies a class as being "convertable" by Compass.

Mostly used to convert classes into a String value that will be stored in the index. Applies to Searchable class SearchableId and SearchableProperty annotations.

Requires a converter that implements the Converter interface. Usually will extend the AbstractBasicConverter (since for other cases, the SearchableComponent can be used).

Alloes for additional settings to be passes to the converter using settings(). For the converter to be injected with the specified settings, it need to implement the CompassConfigurable interface.

Author:
kimchy

Required Element Summary
 Class<? extends Converter> value
          The converter that will be used to convert the class.
 
Optional Element Summary
 SearchSetting[] settings
          Additional settings to inject to the converter.
 

Element Detail

value

public abstract Class<? extends Converter> value
The converter that will be used to convert the class.

Usually will be a converter that converts the class into a String stored in the search engine index (since for other cases, the SearchableComponent can be used). Compass comes with a handy class for such converters: AbstractBasicConverter.

settings

public abstract SearchSetting[] settings
Additional settings to inject to the converter. If set, the converter must implement the CompassConfigurable for them to be injected.

Default:
{}


Copyright (c) 2004-2008 The Compass Project.