public class AsIsTranslatorFactory extends Object implements TranslatorFactory<Object,Object>
This should be near the end of the translation discovery chain. It recognizes any types natively supported by GAE and leaves them as-is when storing in the datastore.
Also handles the case of a field declared Object; we leave it unmolested.
Also - this fixes the boolean.class vs Boolean.class mismatch.
Constructor and Description |
---|
AsIsTranslatorFactory() |
Modifier and Type | Method and Description |
---|---|
Translator<Object,Object> |
create(TypeKey<Object> tk,
CreateContext ctx,
Path path)
Create a translator for a type.
|
public Translator<Object,Object> create(TypeKey<Object> tk, CreateContext ctx, Path path)
TranslatorFactory
create
in interface TranslatorFactory<Object,Object>
tk
- defines the type which is to be translatedpath
- is where this type was discovered, important for logging and exceptionsCopyright © 2014. All rights reserved.