public abstract class AbstractObjectMapper extends java.lang.Object implements ObjectMapper
ObjectMapper that handles most of the work of
object conversion for the subclass.| Constructor and Description |
|---|
AbstractObjectMapper()
Creates the mapper.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
map(com.mongodb.DBObject dbObject,
java.lang.Class<T> objectClass)
Converts the given
DBObject into a java object. |
void |
registerTypeConverter(TypeConverter<?,?> typeConverter)
Registers the given
TypeConverter. |
<T> com.mongodb.DBObject |
unmap(T object)
Converts the given java object into a
DBObject. |
<T> java.lang.Object |
unmapValue(T object)
Converts the given java object into an object suitable for
storage in the database.
|
public <T> T map(com.mongodb.DBObject dbObject,
java.lang.Class<T> objectClass)
DBObject into a java object.map in interface ObjectMapperT - the typedbObject - the DBObjectobjectClass - the Class of the object to convert topublic <T> com.mongodb.DBObject unmap(T object)
DBObject.unmap in interface ObjectMapperT - the typeobject - the java objectDBObjectpublic <T> java.lang.Object unmapValue(T object)
throws MjormException
unmapValue in interface ObjectMapperT - the typeobject - the java objectObjectMjormException - on errorpublic void registerTypeConverter(TypeConverter<?,?> typeConverter)
TypeConverter.typeConverter - the TypeConverterCopyright © 2013. All Rights Reserved.