public class LocaleConverter extends TypeConverter implements SimpleValueConverter
Constructor and Description |
---|
LocaleConverter() |
Modifier and Type | Method and Description |
---|---|
Object |
decode(Class targetClass,
Object fromDBObject,
MappedField optionalExtraInfo)
decode the
DBObject and provide the corresponding java (type-safe) objectNOTE: optionalExtraInfo might be null* |
Object |
encode(Object val,
MappedField optionalExtraInfo)
encode the (type-safe) java object into the corresponding
DBObject * |
static Locale |
parseLocale(String localeString) |
decode, encode, setMapper
public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) throws MappingException
TypeConverter
DBObject
and provide the corresponding java (type-safe) objectdecode
in class TypeConverter
MappingException
public Object encode(Object val, MappedField optionalExtraInfo)
TypeConverter
DBObject
*encode
in class TypeConverter
Copyright © 2015. All rights reserved.