public abstract class ListNodeTranslator<T> extends AbstractTranslator<T>
Helper which expects a list node in the data structure and throws an exception one is not found. Also handles skipping when a null list is found.
Constructor and Description |
---|
ListNodeTranslator() |
Modifier and Type | Method and Description |
---|---|
T |
loadAbstract(Node node,
LoadContext ctx)
Implement loading
|
protected abstract T |
loadList(Node node,
LoadContext ctx)
Implement this knowing that we have a proper list node
|
Node |
saveAbstract(T pojo,
Path path,
boolean index,
SaveContext ctx)
Implement saving
|
protected abstract Node |
saveList(T pojo,
Path path,
boolean index,
SaveContext ctx)
Implement this to return a proper list 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 loadList(Node node, LoadContext ctx)
protected abstract Node saveList(T pojo, Path path, boolean index, SaveContext ctx)
Copyright © 2013. All Rights Reserved.