org.compass.core.mapping.osem.builder
Class SearchableIdComponentMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.osem.builder.SearchableIdComponentMappingBuilder

public class SearchableIdComponentMappingBuilder
extends Object

Specifies a searchable id component on property or field of the SearchableMappingBuilder class.

A searchable id component is a class field/property that reference another class, which content need to be embedded into the content of its searchable class and represents one of its ids.

Author:
kimchy

Field Summary
(package private)  IdComponentMapping mapping
           
 
Constructor Summary
SearchableIdComponentMappingBuilder(String name)
          Construct a new id component mapping buidler for the specified searchable class property name.
 
Method Summary
 SearchableIdComponentMappingBuilder accessor(Accessor accessor)
          Sets the acessor the will be used for the class property.
 SearchableIdComponentMappingBuilder accessor(String accessor)
          Sets the acessor the will be used for the class property.
 SearchableIdComponentMappingBuilder cascade(Cascade... cascade)
          Controls which operations will cascade from the parent searchable class to the referenced component based class.
 SearchableIdComponentMappingBuilder mappingConverter(Converter mappingConverter)
          Sets the mapping converter.
 SearchableIdComponentMappingBuilder mappingConverter(String mappingConverter)
          Sets the mapping converter lookup name.
 SearchableIdComponentMappingBuilder maxDepth(int maxDepth)
          The depth of cyclic component references allowed.
 SearchableIdComponentMappingBuilder overrideByName(boolean override)
          Sets if this mapping will override another mapping with the same name.
 SearchableIdComponentMappingBuilder prefix(String prefix)
          An optional prefix that will be appended to all the component referenced class mappings.
 SearchableIdComponentMappingBuilder 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

mapping

final IdComponentMapping mapping
Constructor Detail

SearchableIdComponentMappingBuilder

public SearchableIdComponentMappingBuilder(String name)
Construct a new id component mapping buidler for the specified searchable class property name.

Method Detail

refAlias

public SearchableIdComponentMappingBuilder refAlias(String... refAlias)
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.


maxDepth

public SearchableIdComponentMappingBuilder maxDepth(int maxDepth)
The depth of cyclic component references allowed. Defaults to 1.


prefix

public SearchableIdComponentMappingBuilder prefix(String prefix)
An optional prefix that will be appended to all the component referenced class mappings.


accessor

public SearchableIdComponentMappingBuilder accessor(Accessor accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter).


accessor

public SearchableIdComponentMappingBuilder accessor(String accessor)
Sets the acessor the will be used for the class property. Defaults to property (getter and optionally setter). Note, this is the lookup name of a PropertyAccessor registered with Compass, with two default ones (custom ones can be easily added) named field and property.


overrideByName

public SearchableIdComponentMappingBuilder overrideByName(boolean override)
Sets if this mapping will override another mapping with the same name. Defaults to true.


cascade

public SearchableIdComponentMappingBuilder cascade(Cascade... cascade)
Controls which operations will cascade from the parent searchable class to the referenced component based class. Defaults to no cascading.


mappingConverter

public SearchableIdComponentMappingBuilder mappingConverter(String mappingConverter)
Sets the mapping converter lookup name. Defaults to ComponentMappingConverter.


mappingConverter

public SearchableIdComponentMappingBuilder mappingConverter(Converter mappingConverter)
Sets the mapping converter. Defaults to ComponentMappingConverter.



Copyright (c) 2004-2009 The Compass Project.