public abstract class TranslatorRecycles<P,D> extends Object implements Translator<P,D>, Recycles
Constructor and Description |
---|
TranslatorRecycles() |
Modifier and Type | Method and Description |
---|---|
P |
load(D node,
LoadContext ctx,
Path path)
Loads the content of the specified datastore node, returning the pojo equivalent.
|
protected abstract P |
loadInto(D node,
LoadContext ctx,
Path path,
P into) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
public final P load(D node, LoadContext ctx, Path path) throws SkipException
Translator
Loads the content of the specified datastore node, returning the pojo equivalent.
There is one special return value: If a Result> is returned, the content of the Result will be used instead, but delayed until ctx.done() is called. This happens at the end of a "round" of load operations and is the magic trick that makes populating entity references work efficiently.
load
in interface Translator<P,D>
node
- is the part of the native datastore entity tree we are transforming.ctx
- holds state information during an entity load.path
- is the current path to this translatorSkipException
- if the return value should be abandoned.LoadEngine
protected abstract P loadInto(D node, LoadContext ctx, Path path, P into)
Copyright © 2016. All rights reserved.