示例#1
0
 /**
  * Assigns / Updates the optician, responsible for this appointment
  *
  * @param optician optician to be assigned to the appointment
  */
 public void setOptician(Staff optician) {
   if (optician == null) {
     this.opticianId = null;
   } else {
     this.opticianId = optician.getId();
   }
 }
 @Test
 @Priority(10)
 public void initData() {
   EntityManager em = getEntityManager();
   em.getTransaction().begin();
   Staff staff = new Staff(HEIGHT_INCHES, 1);
   em.persist(staff);
   em.getTransaction().commit();
   id = staff.getId();
 }