|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.compass.core.mapping.osem.builder.SearchableComponentMappingBuilder
public class SearchableComponentMappingBuilder
Specifies a searchable component on property or field of the SearchableMappingBuilder
class.
A searchable component is a class field/property that reference another class, which content need to be embedded into the content of its searchable class. It will results in searches performed on the component class to return the component field/property searchable class.
The referenced class must have searchable definitions, defined either using annotations or other means (like xml).
Compass will try to automatically identify the searchable class mapping definitions that
map to the component class. If the mappings can not be automatically identified, the
refAlias(String[])
should be used to reference the alias that has the searchable class
mapping definition.
The searchable component can annotate a Collection
type field/property,
supporting either List
or Set
. The searchable component
will try and automatically identify the element type using generics, but if the collection
is not defined with generics, refAlias(String[])
should be used to reference the component
searchable class mapping definitions.
The searchable component can annotate an array as well, with the array element type used for referenced searchable class mapping definitions.
OSEM.component(String)
,
SearchableMappingBuilder.add(SearchableComponentMappingBuilder)
Field Summary | |
---|---|
(package private) ComponentMapping |
mapping
|
Constructor Summary | |
---|---|
SearchableComponentMappingBuilder(String name)
Construct a new component mapping buidler for the specified searchable class property name. |
Method Summary | |
---|---|
SearchableComponentMappingBuilder |
accessor(Accessor accessor)
Sets the acessor the will be used for the class property. |
SearchableComponentMappingBuilder |
accessor(String accessor)
Sets the acessor the will be used for the class property. |
SearchableComponentMappingBuilder |
cascade(Cascade... cascade)
Controls which operations will cascade from the parent searchable class to the referenced component based class. |
SearchableComponentMappingBuilder |
mappingConverter(Converter mappingConverter)
Sets the mapping converter. |
SearchableComponentMappingBuilder |
mappingConverter(String mappingConverter)
Sets the mapping converter lookup name. |
SearchableComponentMappingBuilder |
maxDepth(int maxDepth)
The depth of cyclic component references allowed. |
SearchableComponentMappingBuilder |
overrideByName(boolean override)
Sets if this mapping will override another mapping with the same name. |
SearchableComponentMappingBuilder |
prefix(String prefix)
An optional prefix that will be appended to all the component referenced class mappings. |
SearchableComponentMappingBuilder |
refAlias(String... refAlias)
The reference alias that points to the searchable class (either defined using annotations or xml). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final ComponentMapping mapping
Constructor Detail |
---|
public SearchableComponentMappingBuilder(String name)
Method Detail |
---|
public SearchableComponentMappingBuilder refAlias(String... refAlias)
public SearchableComponentMappingBuilder maxDepth(int maxDepth)
public SearchableComponentMappingBuilder prefix(String prefix)
public SearchableComponentMappingBuilder accessor(Accessor accessor)
public SearchableComponentMappingBuilder accessor(String accessor)
PropertyAccessor
registered with Compass, with two default ones (custom ones can be easily added) named field
and property
.
public SearchableComponentMappingBuilder overrideByName(boolean override)
true
.
public SearchableComponentMappingBuilder cascade(Cascade... cascade)
public SearchableComponentMappingBuilder mappingConverter(String mappingConverter)
ComponentMappingConverter
.
public SearchableComponentMappingBuilder mappingConverter(Converter mappingConverter)
ComponentMappingConverter
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |