public Object clone() { PreAssessmentInformationRequiredCollection newCol = new PreAssessmentInformationRequiredCollection(); PreAssessmentInformationRequired item; for (int i = 0; i < super.size(); i++) { item = this.get(i); newCol.add( new PreAssessmentInformationRequired( 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((PreAssessmentInformationRequired) item.getParent().clone()); } } return newCol; }
public static PreAssessmentInformationRequiredCollection buildFromBeanCollection( ims.vo.LookupInstanceBean[] beans) { PreAssessmentInformationRequiredCollection coll = new PreAssessmentInformationRequiredCollection(); if (beans == null) return coll; for (int x = 0; x < beans.length; x++) { coll.add(PreAssessmentInformationRequired.buildLookup(beans[x])); } return coll; }
public static PreAssessmentInformationRequiredCollection buildFromBeanCollection( java.util.Collection beans) { PreAssessmentInformationRequiredCollection coll = new PreAssessmentInformationRequiredCollection(); if (beans == null) return coll; java.util.Iterator iter = beans.iterator(); while (iter.hasNext()) { coll.add( PreAssessmentInformationRequired.buildLookup((ims.vo.LookupInstanceBean) iter.next())); } return coll; }
private String getWaitingForIDs(PreAssessmentInformationRequiredCollection waitingForColl) { if (waitingForColl == null || waitingForColl.size() == 0) return null; StringBuffer ids = new StringBuffer(); for (int i = 0; i < waitingForColl.size(); i++) { if (waitingForColl.get(i) == null) continue; if (ids.length() > 0) ids.append(","); ids.append(waitingForColl.get(i).getID()); } return ids.toString(); }