Beispiel #1
0
  public void update(int casePK) {
    setCasePK(casePK);

    if (caseTests != null) {
      for (CaseTest t : caseTests) {
        t.setCaseEntity(this);
      }
    }
    JPA.em().merge(this);
  }
Beispiel #2
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);
 }