private int getScoreByAssessmentName(String colFall, BradenScaleDetailsCollection assessmentDetails) { int nScore = 0; RiskAssessment risk; RiskDescription descr; for (int i = 0; i < form.getGlobalContext().COE.getBradenAssessments().size(); i++) { risk = form.getGlobalContext().COE.getBradenAssessments().get(i); if (risk.getName().equalsIgnoreCase(colFall)) { for (int j = 0; j < risk.getRiskFactors().size(); j++) { descr = risk.getRiskFactors().get(j); for (int k = 0; k < assessmentDetails.size(); k++) { if (assessmentDetails.get(k).getAssessment().toString().equals(descr.getId()) && assessmentDetails.get(k).getSelect().equals(Boolean.TRUE)) { nScore += Integer.valueOf(descr.getScore()).intValue(); } } } break; } } return nScore; }
private BradenScaleDetailsCollection copyBradenScaleDetails(BradenScaleDetailsCollection assessmentDetails) { if (assessmentDetails == null) return null; for (int i = 0 ; i < assessmentDetails.size() ; i++) { BradenScaleDetails bradenScaleDetail = assessmentDetails.get(i); if (bradenScaleDetail == null) continue; bradenScaleDetail.clearIDAndVersion(); } return assessmentDetails; }