Class MapifyTranslatorFactory
java.lang.Object
com.googlecode.objectify.impl.translate.MapifyTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory<Map<Object,Object>,Collection<Object>>
public class MapifyTranslatorFactory extends Object implements TranslatorFactory<Map<Object,Object>,Collection<Object>>
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a translator for a type.
-
Constructor Details
-
MapifyTranslatorFactory
public MapifyTranslatorFactory()
-
-
Method Details
-
create
public Translator<Map<Object,Object>,Collection<Object>> create(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>,Collection<Object>>
- 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.
-