1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ken.bo;
17
18 import javax.persistence.JoinColumn;
19 import javax.persistence.FetchType;
20 import javax.persistence.OneToOne;
21 import javax.persistence.Column;
22 import javax.persistence.Id;
23 import javax.persistence.CascadeType;
24 import javax.persistence.Table;
25 import javax.persistence.Entity;
26
27
28
29
30
31
32 @Entity
33 @Table(name="KREN_CHNL_SUBSCRP_T")
34 public class UserChannelSubscription {
35 @Id
36 @Column(name="CHNL_SUBSCRP_ID")
37 private Long id;
38 @Column(name="PRNCPL_ID", nullable=false)
39 private String userId;
40
41 @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST})
42 @JoinColumn(name="CHNL_ID")
43 private NotificationChannel channel;
44
45
46
47
48 public UserChannelSubscription() {
49 }
50
51
52
53
54
55 public NotificationChannel getChannel() {
56 return channel;
57 }
58
59
60
61
62
63 public void setChannel(NotificationChannel channel) {
64 this.channel = channel;
65 }
66
67
68
69
70
71 public Long getId() {
72 return id;
73 }
74
75
76
77
78
79 public void setId(Long id) {
80 this.id = id;
81 }
82
83
84
85
86
87 public String getUserId() {
88 return userId;
89 }
90
91
92
93
94
95 public void setUserId(String userId) {
96 this.userId = userId;
97 }
98 }
99