public abstract class SimpleTranslatorFactory<P,D> extends ValueTranslatorFactory<P,D>
Constructor and Description |
---|
SimpleTranslatorFactory(Class<? extends P> pojoType,
com.google.cloud.datastore.ValueType... datastoreValueTypes) |
Modifier and Type | Method and Description |
---|---|
protected ValueTranslator<P,D> |
createValueTranslator(TypeKey<P> tk,
CreateContext ctx,
Path path)
Create a translator, knowing that we have the appropriate type.
|
protected abstract com.google.cloud.datastore.Value<D> |
toDatastore(P value) |
protected abstract P |
toPojo(com.google.cloud.datastore.Value<D> value) |
create
protected final ValueTranslator<P,D> createValueTranslator(TypeKey<P> tk, CreateContext ctx, Path path)
ValueTranslatorFactory
createValueTranslator
in class ValueTranslatorFactory<P,D>
tk
- type is guaranteed to erase to something assignable to ClassCopyright © 2018. All rights reserved.