Class TextTranslatorFactory
java.lang.Object
com.googlecode.objectify.impl.translate.ValueTranslatorFactory<com.google.appengine.api.datastore.Text,Object>
com.googlecode.objectify.impl.translate.TextTranslatorFactory
- All Implemented Interfaces:
TranslatorFactory<com.google.appengine.api.datastore.Text,Object>
public class TextTranslatorFactory extends ValueTranslatorFactory<com.google.appengine.api.datastore.Text,Object>
Knows how to convert Texts. Aside from String and Text, will work with anything that's in the
datastore just by calling toString() on what we get back; convenient for converting between
say Number and the Text representation, possibly dangerous otherwise.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ValueTranslator<com.google.appengine.api.datastore.Text,Object>
createValueTranslator(TypeKey<com.google.appengine.api.datastore.Text> 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
-
TextTranslatorFactory
public TextTranslatorFactory()
-
-
Method Details
-
createValueTranslator
protected ValueTranslator<com.google.appengine.api.datastore.Text,Object> createValueTranslator(TypeKey<com.google.appengine.api.datastore.Text> 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<com.google.appengine.api.datastore.Text,Object>
- Parameters:
tk
- type is guaranteed to erase to something assignable to Class
-