public class ObjectMapperImpl extends Object implements MorphiumObjectMapper
| Constructor and Description |
|---|
ObjectMapperImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterCustomMapperFor(Class cls) |
<T> T |
deserialize(Class<? extends T> theClass,
Map<String,Object> objectMap) |
<T> T |
deserialize(Class<? extends T> cls,
String jsonString) |
List |
deserializeList(List<Object> lst) |
Map<String,Object> |
deserializeMap(Map<String,Object> dbObject) |
Object |
fillArray(Class<?> componentType,
Collection<?> c) |
Object |
fillCollection(Reference ref,
Class<?> collectionClass,
Type collectionType,
List<?> fromDb) |
protected Map |
fillMap(Type mapType,
Map<String,Object> fromDB) |
protected void |
fillMap(Type mapType,
Map<String,Object> fromDB,
Map toFillIn) |
Class<?> |
getClassForCollectionName(String collectionName) |
String |
getCollectionName(Class cls) |
static Type |
getElementType(ParameterizedType parameterizedType) |
Morphium |
getMorphium() |
NameProvider |
getNameProviderForClass(Class<?> cls)
get current name provider for class
|
Object |
marshallIfNecessary(Object o) |
<T> void |
registerCustomMapperFor(Class<T> cls,
MorphiumTypeMapper<T> map) |
Map<String,Object> |
serialize(Object o) |
Object |
serializeEnum(Class<?> declaredClass,
Enum val) |
List<Object> |
serializeIterable(Iterable v,
Class<?> collectionClass,
Type collectionType) |
Map<String,Object> |
serializeMap(Map v,
Type mapType) |
void |
setAnnotationHelper(AnnotationAndReflectionHelper an) |
void |
setMorphium(Morphium m)
will automatically be called after instanciation by Morphium
also gets the AnnotationAndReflectionHelper from this object (to make use of the caches)
|
void |
setNameProviderForClass(Class<?> cls,
NameProvider np)
override nameprovider in runtime!
|
public void setAnnotationHelper(AnnotationAndReflectionHelper an)
setAnnotationHelper in interface MorphiumObjectMapperpublic Morphium getMorphium()
getMorphium in interface MorphiumObjectMapperpublic void setMorphium(Morphium m)
setMorphium in interface MorphiumObjectMapperm - - the Morphium instancepublic void setNameProviderForClass(Class<?> cls, NameProvider np)
setNameProviderForClass in interface MorphiumObjectMappercls - - class to usenp - - the NameProvider for that classpublic <T> void registerCustomMapperFor(Class<T> cls, MorphiumTypeMapper<T> map)
registerCustomMapperFor in interface MorphiumObjectMapperpublic void deregisterCustomMapperFor(Class cls)
deregisterCustomMapperFor in interface MorphiumObjectMapperpublic NameProvider getNameProviderForClass(Class<?> cls)
MorphiumObjectMappergetNameProviderForClass in interface MorphiumObjectMappercls - - classpublic String getCollectionName(Class cls)
getCollectionName in interface MorphiumObjectMapperpublic Map<String,Object> serialize(Object o)
serialize in interface MorphiumObjectMapperpublic List<Object> serializeIterable(Iterable v, Class<?> collectionClass, Type collectionType)
public <T> T deserialize(Class<? extends T> cls, String jsonString) throws org.json.simple.parser.ParseException
deserialize in interface MorphiumObjectMapperorg.json.simple.parser.ParseExceptionpublic <T> T deserialize(Class<? extends T> theClass, Map<String,Object> objectMap)
deserialize in interface MorphiumObjectMapperpublic Object fillArray(Class<?> componentType, Collection<?> c)
public Object fillCollection(Reference ref, Class<?> collectionClass, Type collectionType, List<?> fromDb)
public static Type getElementType(ParameterizedType parameterizedType)
public Class<?> getClassForCollectionName(String collectionName)
getClassForCollectionName in interface MorphiumObjectMapperCopyright © 2022. All rights reserved.