...
ChildrenFieldProcessor maps fields of type array type or one of the following types java.util.List
which , java.util.Set
, java.util.SortedSet
, java.util.Collection
which are annotated by com.cognifide.slice.mapper.annotation.Children
. It reads all children of a resource indicated by @JcrProperty
and maps them into a list of models. This allows you to easily go down into tree hierarchy and map child resources into list collection of mapped models.
Code Block |
---|
@SliceResource public class ComplexTextModel { @Children(LinkModel.class) @JcrProperty private List<LinkModel> links; //... } @SliceResource public class LinkModel { @JcrProperty private String path; //... } |
...