public Object clone() {
   TerminatedByCollection newCol = new TerminatedByCollection();
   TerminatedBy item;
   for (int i = 0; i < super.size(); i++) {
     item = this.get(i);
     newCol.add(
         new TerminatedBy(
             item.getID(),
             item.getText(),
             item.isActive(),
             item.getParent(),
             item.getImage(),
             item.getColor(),
             item.getOrder()));
   }
   for (int i = 0; i < newCol.size(); i++) {
     item = newCol.get(i);
     if (item.getParent() != null) {
       int parentIndex = this.indexOf(item.getParent());
       if (parentIndex >= 0) item.setParent(newCol.get(parentIndex));
       else item.setParent((TerminatedBy) item.getParent().clone());
     }
   }
   return newCol;
 }
 public static TerminatedByCollection buildFromBeanCollection(ims.vo.LookupInstanceBean[] beans) {
   TerminatedByCollection coll = new TerminatedByCollection();
   if (beans == null) return coll;
   for (int x = 0; x < beans.length; x++) {
     coll.add(TerminatedBy.buildLookup(beans[x]));
   }
   return coll;
 }
 public static TerminatedByCollection buildFromBeanCollection(java.util.Collection beans) {
   TerminatedByCollection coll = new TerminatedByCollection();
   if (beans == null) return coll;
   java.util.Iterator iter = beans.iterator();
   while (iter.hasNext()) {
     coll.add(TerminatedBy.buildLookup((ims.vo.LookupInstanceBean) iter.next()));
   }
   return coll;
 }