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

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

public class JsonContentMappingBuilder
extends Object

A builder allowing to constrcut json content mapping definition allowing to store the actual JSON content withn the index to and be able to rebuild the JsonObject back from the index.

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

Field Summary
(package private)  JsonContentMapping mapping
           
 
Constructor Summary
JsonContentMappingBuilder(String name)
          Constructs a new JSON content mapping with the given name.
 
Method Summary
 JsonContentMappingBuilder converter(Converter converter)
          Sets the actual converter that will be used to convert the JSON content.
 JsonContentMappingBuilder converter(String converterName)
          Sets the lookup converter name (registered with Compass) that will be used to convert the JSON content.
 JsonContentMappingBuilder store(Property.Store store)
          Specifies whether and how a property will be stored.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapping

final JsonContentMapping mapping
Constructor Detail

JsonContentMappingBuilder

public JsonContentMappingBuilder(String name)
Constructs a new JSON content mapping with the given name. The JSON string will be stored as a property within the Resource in the index under the name.

Method Detail

store

public JsonContentMappingBuilder store(Property.Store store)
Specifies whether and how a property will be stored. Deftauls to Property.Store.YES. Note, Property.Store.NO is not valid here.


converter

public JsonContentMappingBuilder converter(String converterName)
Sets the lookup converter name (registered with Compass) that will be used to convert the JSON content. Defaults to JsonContentMappingConverter.


converter

public JsonContentMappingBuilder converter(Converter converter)
Sets the actual converter that will be used to convert the JSON content. Defaults to JsonContentMappingConverter.



Copyright (c) 2004-2009 The Compass Project.