net.vz.mongodb.jackson.internal.util
Class SerializationUtils
java.lang.Object
net.vz.mongodb.jackson.internal.util.SerializationUtils
public class SerializationUtils
- extends Object
Utilities for helping with serialisation
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 |
SerializationUtils
public SerializationUtils()
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 serializationobject
- 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 withvalue
- 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.