use of fi.otavanopisto.pyramus.events.CourseStaffMemberCreatedEvent in project pyramus by otavanopisto.
the class CourseStaffMemberDAO method create.
public CourseStaffMember create(Course course, StaffMember staffMember, CourseStaffMemberRole role) {
CourseStaffMember courseStaffMember = new CourseStaffMember();
courseStaffMember.setCourse(course);
courseStaffMember.setStaffMember(staffMember);
courseStaffMember.setRole(role);
persist(courseStaffMember);
courseStaffMemberCreatedEvent.fire(new CourseStaffMemberCreatedEvent(courseStaffMember.getId(), courseStaffMember.getCourse().getId(), courseStaffMember.getStaffMember().getId()));
return courseStaffMember;
}
Aggregations