Class RefTranslatorFactory
java.lang.Object
com.googlecode.objectify.impl.translate.ValueTranslatorFactory<Ref<?>,com.google.appengine.api.datastore.Key>
com.googlecode.objectify.impl.translate.RefTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory<Ref<?>,com.google.appengine.api.datastore.Key>
public class RefTranslatorFactory extends ValueTranslatorFactory<Ref<?>,com.google.appengine.api.datastore.Key>
Knows how to convert Ref> objects to datastore-native Key objects and vice-versa.
- Author:
- Jeff Schnitzer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ValueTranslator<Ref<?>,com.google.appengine.api.datastore.Key>
createValueTranslator(TypeKey<Ref<?>> tk, CreateContext ctx, Path path)
Create a translator, knowing that we have the appropriate type.Methods inherited from class com.googlecode.objectify.impl.translate.ValueTranslatorFactory
create
-
Constructor Details
-
RefTranslatorFactory
public RefTranslatorFactory()
-
-
Method Details
-
createValueTranslator
protected ValueTranslator<Ref<?>,com.google.appengine.api.datastore.Key> createValueTranslator(TypeKey<Ref<?>> tk, CreateContext ctx, Path path)Description copied from class:ValueTranslatorFactory
Create a translator, knowing that we have the appropriate type. You don't need to check for type matching.- Specified by:
createValueTranslator
in classValueTranslatorFactory<Ref<?>,com.google.appengine.api.datastore.Key>
- Parameters:
tk
- type is guaranteed to erase to something assignable to Class
-