Class MapifyTranslatorFactory
java.lang.Object
com.googlecode.objectify.impl.translate.MapifyTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory<Map<Object,
Object>, List<? extends com.google.cloud.datastore.Value<?>>>
public class MapifyTranslatorFactory
extends Object
implements TranslatorFactory<Map<Object,Object>,List<? extends com.google.cloud.datastore.Value<?>>>
This takes a datastore collection and converts it to a POJO Map by letting you select out the key value using a class of your own devising. The values will be written to the collection, not the keys.
- Author:
- Jeff Schnitzer <[email protected]>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MapifyTranslatorFactory
public MapifyTranslatorFactory()
-
-
Method Details
-
create
public Translator<Map<Object,Object>, createList<? extends com.google.cloud.datastore.Value<?>>> (TypeKey<Map<Object, Object>> tk, CreateContext ctx, Path path) Description copied from interface:TranslatorFactory
Create a translator for a type.- Specified by:
create
in interfaceTranslatorFactory<Map<Object,
Object>, List<? extends com.google.cloud.datastore.Value<?>>> - Parameters:
tk
- defines the type which is to be translatedpath
- is where this type was discovered, important for logging and exceptions- Returns:
- null if this factory does not know how to deal with that situation.
-