public class EmbeddedMapTranslatorFactory extends Object implements TranslatorFactory<Map<Object,Object>,com.google.cloud.datastore.FullEntity<?>>
Translator which turns a Map<String, ?> into an EmbeddedEntity. As keys in EmbeddedEntity, the map keys must be String or something that can be converted to/from String via a Stringifier. The value can be any normal translated value.
This automatically stringifies Enums and objectify Key<?>s
Constructor and Description |
---|
EmbeddedMapTranslatorFactory() |
Modifier and Type | Method and Description |
---|---|
Translator<Map<Object,Object>,com.google.cloud.datastore.FullEntity<?>> |
create(TypeKey<Map<Object,Object>> tk,
CreateContext ctx,
Path path)
Create a translator for a type.
|
public Translator<Map<Object,Object>,com.google.cloud.datastore.FullEntity<?>> create(TypeKey<Map<Object,Object>> tk, CreateContext ctx, Path path)
TranslatorFactory
create
in interface TranslatorFactory<Map<Object,Object>,com.google.cloud.datastore.FullEntity<?>>
tk
- defines the type which is to be translatedpath
- is where this type was discovered, important for logging and exceptionsCopyright © 2017. All rights reserved.