public abstract class MapNodeTranslator<T> extends AbstractTranslator<T>
Helper which expects a map node in the data structure and throws an exception if a map is not found. Accepts null values, just passing them on as a simple property.
Constructor and Description |
---|
MapNodeTranslator() |
Modifier and Type | Method and Description |
---|---|
T |
loadAbstract(Node node,
LoadContext ctx)
Implement loading
|
protected abstract T |
loadMap(Node node,
LoadContext ctx)
Implement this knowing that we have a proper map node
|
Node |
saveAbstract(T pojo,
Path path,
boolean index,
SaveContext ctx)
Implement saving
|
protected abstract Node |
saveMap(T pojo,
Path path,
boolean index,
SaveContext ctx)
Implement this, returning a map node
|
load, save
public final T loadAbstract(Node node, LoadContext ctx)
AbstractTranslator
loadAbstract
in class AbstractTranslator<T>
public final Node saveAbstract(T pojo, Path path, boolean index, SaveContext ctx)
AbstractTranslator
saveAbstract
in class AbstractTranslator<T>
protected abstract T loadMap(Node node, LoadContext ctx)
protected abstract Node saveMap(T pojo, Path path, boolean index, SaveContext ctx)
Copyright © 2014. All rights reserved.