Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
NotificationSender |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
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 | * This class represents the data structure that will house information about the non-system | |
26 | * sender that a notification message is sent on behalf of. | |
27 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
28 | */ | |
29 | @Entity | |
30 | @Table(name="KREN_SNDR_T") | |
31 | public class NotificationSender extends PersistableBusinessObjectBase{ | |
32 | @Id | |
33 | @GeneratedValue(generator="KREN_SNDR_S") | |
34 | @GenericGenerator(name="KREN_SNDR_S",strategy="org.hibernate.id.enhanced.SequenceStyleGenerator",parameters={ | |
35 | @Parameter(name="sequence_name",value="KREN_SNDR_S"), | |
36 | @Parameter(name="value_column",value="id") | |
37 | }) | |
38 | @Column(name="SNDR_ID") | |
39 | private Long id; | |
40 | @Column(name="NTFCTN_ID", nullable=false) | |
41 | private Long notificationId; | |
42 | @Column(name="NM", nullable=false) | |
43 | private String senderName; | |
44 | ||
45 | // Added for JPA uni-directional one-to-many (not yet supported by JPA) | |
46 | @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.REMOVE}) | |
47 | @JoinColumn(name="NTFCTN_ID", insertable=false, updatable=false) | |
48 | private Notification notification; | |
49 | ||
50 | /** | |
51 | * Constructs a NotificationSender.java instance. | |
52 | */ | |
53 | 0 | public NotificationSender() { |
54 | 0 | } |
55 | ||
56 | /** | |
57 | * Gets the id attribute. | |
58 | * @return Returns the id. | |
59 | */ | |
60 | public Long getId() { | |
61 | 0 | return id; |
62 | } | |
63 | ||
64 | /** | |
65 | * Sets the id attribute value. | |
66 | * @param id The id to set. | |
67 | */ | |
68 | public void setId(Long id) { | |
69 | 0 | this.id = id; |
70 | 0 | } |
71 | ||
72 | /** | |
73 | * Gets the notificationId attribute. | |
74 | * @return Returns the notificationId. | |
75 | */ | |
76 | public Long getNotificationId() { | |
77 | 0 | return notificationId; |
78 | } | |
79 | ||
80 | /** | |
81 | * Sets the notificationId attribute value. | |
82 | * @param notificationId The notificationId to set. | |
83 | */ | |
84 | public void setNotificationId(Long notificationId) { | |
85 | 0 | this.notificationId = notificationId; |
86 | 0 | } |
87 | ||
88 | /** | |
89 | * Gets the senderName attribute. | |
90 | * @return Returns the senderName. | |
91 | */ | |
92 | public String getSenderName() { | |
93 | 0 | return senderName; |
94 | } | |
95 | ||
96 | /** | |
97 | * Sets the senderName attribute value. | |
98 | * @param senderName The senderName to set. | |
99 | */ | |
100 | public void setSenderName(String userId) { | |
101 | 0 | this.senderName = userId; |
102 | 0 | } |
103 | } |