@Override public void removeAllChildren() { for (Iterator<ProductLine> iter = products.iterator(); iter.hasNext(); ) { ProductLine pl = iter.next(); pl.setCategory(null); iter.remove(); } }
@Override public void removeChild(Object child) { if (products.remove(child)) { ((ProductLine) child).setCategory(null); } }
public ProductLine newProductLine() { ProductLine pl = new ProductLine(); pl.setCategory(this); getProducts().add(pl); return pl; }