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 org.hibernate.annotations.GenericGenerator;
19 import org.hibernate.annotations.Parameter;
20 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
21
22 import javax.persistence.*;
23
24
25
26
27
28
29 @Entity
30 @Table(name="KREN_CHNL_SUBSCRP_T")
31 public class UserChannelSubscription extends PersistableBusinessObjectBase{
32 @Id
33 @GeneratedValue(generator="KREN_CHNL_SUBSCRP_S")
34 @GenericGenerator(name="KREN_CHNL_SUBSCRP_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
35 @Parameter(name="sequence_name",value="KREN_CHNL_SUBSCRP_S"),
36 @Parameter(name="value_column",value="id")
37 })
38 @Column(name="CHNL_SUBSCRP_ID")
39 private Long id;
40 @Column(name="PRNCPL_ID", nullable=false)
41 private String userId;
42
43 @OneToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH, CascadeType.MERGE})
44 @JoinColumn(name="CHNL_ID")
45 private NotificationChannel channel;
46
47
48
49
50 public UserChannelSubscription() {
51 }
52
53
54
55
56
57 public NotificationChannel getChannel() {
58 return channel;
59 }
60
61
62
63
64
65 public void setChannel(NotificationChannel channel) {
66 this.channel = channel;
67 }
68
69
70
71
72
73 public Long getId() {
74 return id;
75 }
76
77
78
79
80
81 public void setId(Long id) {
82 this.id = id;
83 }
84
85
86
87
88
89 public String getUserId() {
90 return userId;
91 }
92
93
94
95
96
97 public void setUserId(String userId) {
98 this.userId = userId;
99 }
100 }
101