public static Sched_Profile_TypeCollection buildFromBeanCollection( ims.vo.LookupInstanceBean[] beans) { Sched_Profile_TypeCollection coll = new Sched_Profile_TypeCollection(); if (beans == null) return coll; for (int x = 0; x < beans.length; x++) { coll.add(Sched_Profile_Type.buildLookup(beans[x])); } return coll; }
public static Sched_Profile_TypeCollection buildFromBeanCollection(java.util.Collection beans) { Sched_Profile_TypeCollection coll = new Sched_Profile_TypeCollection(); if (beans == null) return coll; java.util.Iterator iter = beans.iterator(); while (iter.hasNext()) { coll.add(Sched_Profile_Type.buildLookup((ims.vo.LookupInstanceBean) iter.next())); } return coll; }
public Object clone() { Sched_Profile_TypeCollection newCol = new Sched_Profile_TypeCollection(); Sched_Profile_Type item; for (int i = 0; i < super.size(); i++) { item = this.get(i); newCol.add( new Sched_Profile_Type( 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((Sched_Profile_Type) item.getParent().clone()); } } return newCol; }