Die Klasse ProductDsp:
public class ProductDsp extends ProductBaseDsp implements TreeNodeDataModel {
/**
* ParentNode
*/
private TreeGroupDataModel parent = null;
/**
* Constructor
* @param key Unique Productkey
* @param name Productname
*/
public ProductDsp(String key, String name) {
super();
this.key = key;
this.name = name;
this.type = "product";
}
/**
* Constructor
* @param key Unique Productkey
* @param name Productname
* @param description Product description
*/
public ProductDsp(String key, String name, String description) {
super();
this.key = key;
this.name = name;
this.description = description;
this.type = "product";
}
public void setParent(TreeGroupDataModel parent) {
this.parent = parent;
}
public TreeGroupDataModel getParent() { return parent; }
public String getParentKey() { return parent.getUniqueKey(); }
public String getUniqueKey() { return this.key; }
}