public Instructor update(Instructor instructor) { instructorVerifier.verifyOnUpdate(instructor); Long locationId = commonDao.provideCourseLocation(instructor.getOffice()); instructorDao.update(instructor, locationId); commonDao.deleteAllOfficeHoursForInstructor(instructor.getId()); createOfficeHours(instructor); return instructorDao.getById(instructor.getId()); }
public void delete(Instructor instructor) { instructorVerifier.verifyOnDelete(instructor); commonDao.deleteAllOfficeHoursForInstructor(instructor.getId()); instructorDao.delete(instructor.getId()); }