net.vz.mongodb.jackson.internal.util
Class SerializationUtils

java.lang.Object
  extended by net.vz.mongodb.jackson.internal.util.SerializationUtils

public class SerializationUtils
extends Object

Utilities for helping with serialisation


Constructor Summary
SerializationUtils()
           
 
Method Summary
static Object serializeField(org.codehaus.jackson.map.ObjectMapper objectMapper, Object value)
          Serialize the given field
static com.mongodb.DBObject serializeFields(org.codehaus.jackson.map.ObjectMapper objectMapper, com.mongodb.DBObject object)
          Serialize the fields of the given object using the given object mapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializationUtils

public SerializationUtils()
Method Detail

serializeFields

public static com.mongodb.DBObject serializeFields(org.codehaus.jackson.map.ObjectMapper objectMapper,
                                                   com.mongodb.DBObject object)
Serialize the fields of the given object using the given object mapper. This will convert POJOs to DBObjects where necessary.

Parameters:
objectMapper - The object mapper to use to do the serialization
object - The object to serialize the fields of
Returns:
The DBObject, safe for serialization to MongoDB

serializeField

public static Object serializeField(org.codehaus.jackson.map.ObjectMapper objectMapper,
                                    Object value)
Serialize the given field

Parameters:
objectMapper - The object mapper to serialize it with
value - The value to serialize
Returns:
The serialized field. May return the same object if no serialization was necessary.


Copyright © 2011-2012 VZ Netzwerke. All Rights Reserved.