1 package dst.ass1.jpa.model.impl;
3 import dst.ass1.jpa.model.ICourse;
4 import dst.ass1.jpa.model.IEnrollmentKey;
5 import dst.ass1.jpa.model.IParticipant;
6 import dst.ass1.jpa.util.Constants;
8 import javax.persistence.Embeddable;
9 import javax.persistence.JoinColumn;
10 import javax.persistence.ManyToOne;
11 import java.io.Serializable;
14 public class EnrollmentKey implements IEnrollmentKey, Serializable {
15 @ManyToOne(targetEntity = Participant.class, optional = false)
16 @JoinColumn(name = Constants.I_PARTICIPANT)
17 private IParticipant participant;
19 @ManyToOne(targetEntity = Course.class, optional = false)
20 @JoinColumn(name = Constants.I_COURSE)
21 private ICourse course;
24 public IParticipant getParticipant() {
29 public void setParticipant(IParticipant participant) {
30 this.participant = participant;
34 public ICourse getCourse() {
39 public void setCourse(ICourse course) {