@Override
    public void linkLecturer(String staffNum) {
        lecturerEntity = lookupLecturer(staffNum);
        if (lecturerEntity == null) {
            em.remove(lecturerEntity);
        } else {
            moduleEntity.setLecturer(lecturerEntity);
            em.merge(moduleEntity);
        }
    }