public List<String> getCaseTestsSparse() { List<String> sparseTests = new LinkedList<String>(); for (CaseTest caseTest : this.getCaseTests()) { sparseTests.add(caseTest.getTestNumber() + " " + caseTest.getTestName()); } return sparseTests; }
public Set<Integer> getCaseTestNumbers() { Set<Integer> caseTestNumbers = new HashSet<Integer>(); for (CaseTest ct : getCaseTests()) { caseTestNumbers.add(ct.getTestNumber()); } return caseTestNumbers; }
public Date getLatestReportedDate() { Date toReturn = new Date(); for (CaseTest ct : getCaseTests()) { toReturn = ct.getReportedDate(); } return toReturn; }
public void update(int casePK) { setCasePK(casePK); if (caseTests != null) { for (CaseTest t : caseTests) { t.setCaseEntity(this); } } JPA.em().merge(this); }
public void save() { if (this.getCaseNote() != null) { // save the comment if they entered one. JPA.em().persist(this.getCaseNote()); } if (caseTests != null) { for (CaseTest t : caseTests) { t.setCaseEntity(this); } } JPA.em().persist(this); }
public void setAllCaseTestsToReported(Date date) { for (CaseTest ct : getCaseTests()) { ct.setReported(true); ct.setReportedDate(date); } }
public void setAllCaseTestsToReported() { for (CaseTest ct : getCaseTests()) { ct.setReported(true); } }