use of fi.otavanopisto.pyramus.events.StudyProgrammeCreatedEvent in project pyramus by otavanopisto.
the class StudyProgrammeDAO method create.
public StudyProgramme create(Organization organization, String name, StudyProgrammeCategory category, String code, boolean hasEvaluationFees) {
EntityManager entityManager = getEntityManager();
StudyProgramme studyProgramme = new StudyProgramme();
studyProgramme.setOrganization(organization);
studyProgramme.setName(name);
studyProgramme.setCategory(category);
studyProgramme.setCode(code);
studyProgramme.setHasEvaluationFees(hasEvaluationFees);
entityManager.persist(studyProgramme);
studyProgrammeCreatedEvent.fire(new StudyProgrammeCreatedEvent(studyProgramme.getId()));
return studyProgramme;
}
Aggregations