public interface TranslatorFactory<P,D>
A translator knows how to convert between a POJO and a native datastore representation. When an entity class is registered, the known TranslatorFactories are queried to produce a translator for that class; this translator will in turn be composed of translators for all of the fields, etc. These translators become a static metamodel that can efficiently convert back and forth between the formats with minimal runtime overhead.
P is the pojo type, D is the datastore type.
Modifier and Type | Method and Description |
---|---|
Translator<P,D> |
create(TypeKey<P> tk,
CreateContext ctx,
Path path)
Create a translator for a type.
|
Translator<P,D> create(TypeKey<P> tk, CreateContext ctx, Path path)
tk
- defines the type which is to be translatedpath
- is where this type was discovered, important for logging and exceptionsCopyright © 2016. All rights reserved.