|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.converter.mapping.json.JsonContentMappingConverter
public class JsonContentMappingConverter
| Constructor Summary | |
|---|---|
JsonContentMappingConverter()
|
|
| Method Summary | |
|---|---|
void |
configure(CompassSettings settings)
Configure using the given settings. |
JsonContentConverter |
getContentConverter()
|
protected boolean |
handleNulls(MarshallingContext context)
Should the converter handle nulls? |
protected boolean |
isNullValue(MarshallingContext context,
String value)
Is the value read from the search engine is a null value
during the unmarshall process. |
boolean |
marshall(Resource resource,
Object root,
Mapping mapping,
MarshallingContext context)
Marshall the given Object to the given Resource. |
Object |
unmarshall(Resource resource,
Mapping mapping,
MarshallingContext context)
Unmarshall the given Resource to the appropiate Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonContentMappingConverter()
| Method Detail |
|---|
public void configure(CompassSettings settings)
throws CompassException
CompassConfigurable
configure in interface CompassConfigurablesettings - The settings for the configured object
CompassExceptionpublic JsonContentConverter getContentConverter()
public boolean marshall(Resource resource,
Object root,
Mapping mapping,
MarshallingContext context)
throws ConversionException
ConverterObject to the given Resource. Will use
the mapping definition as to how to marshall the object.
Returns true if data was saved in the index, and it can
be read as well (i.e. stored).
marshall in interface Converterresource - The resource to marhsall the object toroot - The Object to marshall to the resourcemapping - The mapping definition of how to marshall the Object to the resorucecontext - The context for the current marhslling process
true if data was saved in the the index that can be read.
ConversionException
public Object unmarshall(Resource resource,
Mapping mapping,
MarshallingContext context)
throws ConversionException
ConverterResource to the appropiate Object.
unmarshall in interface Converterresource - The resource to unmarshall into an Objectmapping - The mapping definition of how to unmarshall the Resource into an Objectcontext - The context for the current marshalling process
ConversionExceptionprotected boolean handleNulls(MarshallingContext context)
MarshallingContext.handleNulls()).
Extracted to a method so special converters can control null handling.
context - The marshalling context
true if the converter should handle null values
protected boolean isNullValue(MarshallingContext context,
String value)
null value
during the unmarshall process.
context - The marshalling contextvalue - The value to check for null value.
true if the value represents a null value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||