Beispiel #1
0
 public List<String> getCaseTestsSparse() {
   List<String> sparseTests = new LinkedList<String>();
   for (CaseTest caseTest : this.getCaseTests()) {
     sparseTests.add(caseTest.getTestNumber() + " " + caseTest.getTestName());
   }
   return sparseTests;
 }
Beispiel #2
0
 public Set<Integer> getCaseTestNumbers() {
   Set<Integer> caseTestNumbers = new HashSet<Integer>();
   for (CaseTest ct : getCaseTests()) {
     caseTestNumbers.add(ct.getTestNumber());
   }
   return caseTestNumbers;
 }
Beispiel #3
0
  public Date getLatestReportedDate() {
    Date toReturn = new Date();
    for (CaseTest ct : getCaseTests()) {
      toReturn = ct.getReportedDate();
    }

    return toReturn;
  }
Beispiel #4
0
  public void update(int casePK) {
    setCasePK(casePK);

    if (caseTests != null) {
      for (CaseTest t : caseTests) {
        t.setCaseEntity(this);
      }
    }
    JPA.em().merge(this);
  }
Beispiel #5
0
 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);
 }
Beispiel #6
0
 public void setAllCaseTestsToReported(Date date) {
   for (CaseTest ct : getCaseTests()) {
     ct.setReported(true);
     ct.setReportedDate(date);
   }
 }
Beispiel #7
0
 public void setAllCaseTestsToReported() {
   for (CaseTest ct : getCaseTests()) {
     ct.setReported(true);
   }
 }