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