org.compass.core.mapping.json.builder
Class JsonBoostMappingBuilder

java.lang.Object
  extended by org.compass.core.mapping.json.builder.JsonBoostMappingBuilder

public class JsonBoostMappingBuilder
extends Object

Allows to dynamically define the boost value of the resource based on a JSON property value.

Author:
kimchy
See Also:
JSEM.boost(String)

Field Summary
(package private)  JsonBoostPropertyMapping mapping
           
 
Constructor Summary
JsonBoostMappingBuilder(String name)
          Constructs a new boost JSON property mapping.
 
Method Summary
 JsonBoostMappingBuilder defaultBoost(float defaultBoost)
          The default boost value that will be used of the JSON property to be used has null value.
 JsonBoostMappingBuilder mappingConverter(Converter converter)
          Sets an actual converter that will be used to convert this property value.
 JsonBoostMappingBuilder mappingConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.
 JsonBoostMappingBuilder valueConverter(Converter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonBoostMappingBuilder valueConverter(ResourcePropertyConverter converter)
          Sets the actual converter that will be used to convert the actual value of the json property.
 JsonBoostMappingBuilder valueConverter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final JsonBoostPropertyMapping mapping
Constructor Detail

JsonBoostMappingBuilder

public JsonBoostMappingBuilder(String name)
Constructs a new boost JSON property mapping.

Method Detail

defaultBoost

public JsonBoostMappingBuilder defaultBoost(float defaultBoost)
The default boost value that will be used of the JSON property to be used has null value. Defaults to 1.0f.


mappingConverter

public JsonBoostMappingBuilder mappingConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the value of the property.


mappingConverter

public JsonBoostMappingBuilder mappingConverter(Converter converter)
Sets an actual converter that will be used to convert this property value.


valueConverter

public JsonBoostMappingBuilder valueConverter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonBoostMappingBuilder valueConverter(Converter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.


valueConverter

public JsonBoostMappingBuilder valueConverter(ResourcePropertyConverter converter)
Sets the actual converter that will be used to convert the actual value of the json property. Detaults to SimpleJsonValueConverter.



Copyright (c) 2004-2009 The Compass Project.