| org.compass.annotations.SearchableReference
SearchableReference | public @interface SearchableReference(Code) | | Specifies a searchable reference on property or field of the
Searchable class.
A searchable reference is a class field/property that reference another class, and the
relationship need to be stored by Compass so it can be traversed when getting the class
from the index.
Compass will end up saving only the ids of the referenced class in the search engine index.
The searchalbe reference can annotate a
java.util.Collection type field/property,
supporting either
java.util.List or
java.util.Set . The searchable refrence
will try and automatically identify the element type using generics, but if the collection
is not defined with generics,
SearchableReference.refAlias() should be used to reference the referenced
searchable class mapping definitions.
The searchable compoent can annotate an array as well, with the array element type used for
refernced searchable class mapping definitions.
The refence mapping can have a "shadow" component mapping associated with it, if specifing
the
SearchableReference.refComponentAlias() .
author: kimchy |
Field Summary | |
String | accessor The property accessor that will be fetch and write the property value.
It is automatically set based on where the annotation is used, but can be
explicitly set. | Cascade[] | cascade The operations that will cascade to the target association. | String | converter The conveter lookup name that will convert the
org.compass.core.mapping.osem.ReferenceMapping . | String | refAlias The reference alias that points to the searchable class (either defined using
annotations or xml). | String | refComponentAlias Specifies a reference to a searchable component that will be used
to embed some of the referenced class searchable content into the
field/property searchable class. |
accessor | String accessor(Code) | | The property accessor that will be fetch and write the property value.
It is automatically set based on where the annotation is used, but can be
explicitly set. Compass also supports custom property accessors, registered
under a custom name, which can then be used here as well.
|
cascade | Cascade[] cascade(Code) | | The operations that will cascade to the target association. Defaults to no operations
being cascaded.
|
refAlias | String refAlias(Code) | | The reference alias that points to the searchable class (either defined using
annotations or xml). Not required since most of the times it can be automatically
detected.
|
refComponentAlias | String refComponentAlias(Code) | | Specifies a reference to a searchable component that will be used
to embed some of the referenced class searchable content into the
field/property searchable class.
|
|
|