示例#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;
 }
示例#2
0
 public Set<Integer> getCaseTestNumbers() {
   Set<Integer> caseTestNumbers = new HashSet<Integer>();
   for (CaseTest ct : getCaseTests()) {
     caseTestNumbers.add(ct.getTestNumber());
   }
   return caseTestNumbers;
 }
示例#3
0
  public Date getLatestReportedDate() {
    Date toReturn = new Date();
    for (CaseTest ct : getCaseTests()) {
      toReturn = ct.getReportedDate();
    }

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

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