public void setParent(Feed parent) { this.parent = parent; setParentId(parent == null ? null : parent.getId()); }
public String getPath() { return parent == null ? name : parent.getPath() + "/" + name; }
public void addChild(Feed feed) { if (children == null) children = new ArrayList(); feed.setParent(this); children.add(feed); }