1 | |
package org.kuali.student.enrollment.class1.lui.model; |
2 | |
|
3 | |
import java.util.List; |
4 | |
|
5 | |
import javax.persistence.CascadeType; |
6 | |
import javax.persistence.Column; |
7 | |
import javax.persistence.Entity; |
8 | |
import javax.persistence.JoinColumn; |
9 | |
import javax.persistence.ManyToOne; |
10 | |
import javax.persistence.OneToMany; |
11 | |
import javax.persistence.Table; |
12 | |
|
13 | |
import org.kuali.student.r2.common.dto.MeetingScheduleInfo; |
14 | |
import org.kuali.student.r2.common.entity.AttributeOwner; |
15 | |
import org.kuali.student.r2.common.entity.BaseEntity; |
16 | |
import org.kuali.student.r2.common.infc.MeetingSchedule; |
17 | |
|
18 | |
@Entity |
19 | |
@Table(name = "KSEN_LUI_MTG_SCHE") |
20 | |
public class MeetingScheduleEntity extends BaseEntity implements AttributeOwner<MeetingScheduleAttributeEntity> { |
21 | |
|
22 | |
@Column(name = "SPACE_ID") |
23 | |
private String spaceId; |
24 | |
|
25 | |
@Column(name = "SCHEDULE_ID") |
26 | |
private String scheduleId; |
27 | |
|
28 | |
@ManyToOne |
29 | |
@JoinColumn(name = "LUI_ID") |
30 | |
private LuiEntity lui; |
31 | |
|
32 | |
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
33 | |
private List<MeetingScheduleAttributeEntity> attributes; |
34 | |
|
35 | 0 | public MeetingScheduleEntity() {} |
36 | |
|
37 | 0 | public MeetingScheduleEntity(MeetingSchedule meetingSchedule) { |
38 | |
|
39 | |
|
40 | 0 | this.setId(meetingSchedule.getId()); |
41 | 0 | this.setSpaceId(meetingSchedule.getSpaceId()); |
42 | 0 | this.setScheduleId(meetingSchedule.getScheduleId()); |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | 0 | } |
58 | |
|
59 | |
public MeetingScheduleInfo toDto() { |
60 | 0 | MeetingScheduleInfo obj = new MeetingScheduleInfo(); |
61 | 0 | obj.setId(getId()); |
62 | 0 | obj.setSpaceId(spaceId); |
63 | 0 | obj.setScheduleId(scheduleId); |
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | 0 | return obj; |
74 | |
} |
75 | |
|
76 | |
public String getSpaceId() { |
77 | 0 | return spaceId; |
78 | |
} |
79 | |
|
80 | |
public void setSpaceId(String spaceId) { |
81 | 0 | this.spaceId = spaceId; |
82 | 0 | } |
83 | |
|
84 | |
public String getScheduleId() { |
85 | 0 | return scheduleId; |
86 | |
} |
87 | |
|
88 | |
public void setScheduleId(String scheduleId) { |
89 | 0 | this.scheduleId = scheduleId; |
90 | 0 | } |
91 | |
|
92 | |
public LuiEntity getLui() { |
93 | 0 | return lui; |
94 | |
} |
95 | |
|
96 | |
public void setLui(LuiEntity lui) { |
97 | 0 | this.lui = lui; |
98 | 0 | } |
99 | |
|
100 | |
@Override |
101 | |
public void setAttributes(List<MeetingScheduleAttributeEntity> attributes) { |
102 | 0 | this.attributes = attributes; |
103 | 0 | } |
104 | |
|
105 | |
@Override |
106 | |
public List<MeetingScheduleAttributeEntity> getAttributes() { |
107 | 0 | return attributes; |
108 | |
} |
109 | |
|
110 | |
} |