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 import java.util.ArrayList;
24 import java.util.List;
25
26
27
28
29
30
31 @Entity
32 @Table(name="KREN_PRODCR_T")
33 public class NotificationProducer extends PersistableBusinessObjectBase{
34 @Id
35 @GeneratedValue(generator="KREN_PRODCR_S")
36 @GenericGenerator(name="KREN_PRODCR_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={
37 @Parameter(name="sequence_name",value="KREN_PRODCR_S"),
38 @Parameter(name="value_column",value="id")
39 })
40 @Column(name="PRODCR_ID")
41 private Long id;
42 @Column(name="NM", nullable=false)
43 private String name;
44 @Column(name="DESC_TXT", nullable=false)
45 private String description;
46 @Column(name="CNTCT_INFO", nullable=false)
47 private String contactInfo;
48
49
50 @ManyToMany(fetch=FetchType.EAGER, cascade={CascadeType.ALL})@JoinTable(name="KREN_CHNL_PRODCR_T",
51 joinColumns=@JoinColumn(name="PRODCR_ID"),
52 inverseJoinColumns=@JoinColumn(name="CHNL_ID"))
53 @OrderBy("id ASC")
54 private List<NotificationChannel> channels;
55
56
57
58
59 public NotificationProducer() {
60 channels = new ArrayList<NotificationChannel>();
61 }
62
63
64
65
66
67 public String getContactInfo() {
68 return contactInfo;
69 }
70
71
72
73
74
75 public void setContactInfo(String contactInfo) {
76 this.contactInfo = contactInfo;
77 }
78
79
80
81
82
83 public String getDescription() {
84 return description;
85 }
86
87
88
89
90
91 public void setDescription(String description) {
92 this.description = description;
93 }
94
95
96
97
98
99 public Long getId() {
100 return id;
101 }
102
103
104
105
106
107 public void setId(Long id) {
108 this.id = id;
109 }
110
111
112
113
114
115 public String getName() {
116 return name;
117 }
118
119
120
121
122
123 public void setName(String name) {
124 this.name = name;
125 }
126
127
128
129
130
131 public List<NotificationChannel> getChannels() {
132 return channels;
133 }
134
135
136
137
138
139 public void setChannels(List<NotificationChannel> channels) {
140 this.channels = channels;
141 }
142 }