Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RecipientDelivererConfig |
|
| 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.kcb.bo; | |
17 | ||
18 | import javax.persistence.Column; | |
19 | import javax.persistence.Entity; | |
20 | import javax.persistence.Id; | |
21 | import javax.persistence.Table; | |
22 | import javax.persistence.Version; | |
23 | ||
24 | import org.apache.commons.lang.builder.ToStringBuilder; | |
25 | ||
26 | /** | |
27 | * This class represents the enablement of a deliverer for a particular channel for a particular user. | |
28 | * Each RecipientDelivererConfig instance represents a user as having applied a deliverer type configuration | |
29 | * to a channel, such that any messages, targeted at the userId, will also be delivered to the correlating | |
30 | * deliverer type (delivererName) for that user. | |
31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
32 | */ | |
33 | @Entity | |
34 | @Table(name="KREN_RECIP_DELIV_T") | |
35 | 0 | public class RecipientDelivererConfig { |
36 | /** | |
37 | * Field names for queries | |
38 | */ | |
39 | public static final String RECIPIENT_ID = "recipientId"; | |
40 | public static final String CHANNEL = "channel"; | |
41 | ||
42 | @Id | |
43 | @Column(name="RECIP_DELIV_ID") | |
44 | private Long id; | |
45 | @Column(name="RECIP_ID", nullable=false) | |
46 | private String recipientId; | |
47 | @Column(name="NM", nullable=false) | |
48 | private String delivererName; | |
49 | @Column(name="CHNL", nullable=false) | |
50 | private String channel; | |
51 | /** | |
52 | * Lock column for OJB optimistic locking | |
53 | */ | |
54 | @Version | |
55 | @Column(name="VER_NBR") | |
56 | private Integer lockVerNbr; | |
57 | ||
58 | /** | |
59 | * Gets the id attribute. | |
60 | * @return Returns the id. | |
61 | */ | |
62 | public Long getId() { | |
63 | 0 | return id; |
64 | } | |
65 | ||
66 | /** | |
67 | * Sets the id attribute value. | |
68 | * @param id The id to set. | |
69 | */ | |
70 | public void setId(Long id) { | |
71 | 0 | this.id = id; |
72 | 0 | } |
73 | ||
74 | /** | |
75 | * Return value of lock column for OJB optimistic locking | |
76 | * @return value of lock column for OJB optimistic locking | |
77 | */ | |
78 | public Integer getLockVerNbr() { | |
79 | 0 | return lockVerNbr; |
80 | } | |
81 | ||
82 | /** | |
83 | * Set value of lock column for OJB optimistic locking | |
84 | * @param lockVerNbr value of lock column for OJB optimistic locking | |
85 | */ | |
86 | public void setLockVerNbr(Integer lockVerNbr) { | |
87 | 0 | this.lockVerNbr = lockVerNbr; |
88 | 0 | } |
89 | ||
90 | /** | |
91 | * Gets the recipientId attribute. | |
92 | * @return Returns the recipientId. | |
93 | */ | |
94 | public String getRecipientId() { | |
95 | 0 | return recipientId; |
96 | } | |
97 | ||
98 | /** | |
99 | * Sets the recipientId attribute value. | |
100 | * @param recipientId The userId to set. | |
101 | */ | |
102 | public void setRecipientId(String recipientId) { | |
103 | 0 | this.recipientId = recipientId; |
104 | 0 | } |
105 | ||
106 | /** | |
107 | * Gets the delivererName attribute. | |
108 | * @return Returns the name. | |
109 | */ | |
110 | public String getDelivererName() { | |
111 | 0 | return delivererName; |
112 | } | |
113 | ||
114 | /** | |
115 | * Sets the delivererName attribute value. | |
116 | * @param delivererName The delivererName to set. | |
117 | */ | |
118 | public void setDelivererName(String delivererName) { | |
119 | 0 | this.delivererName = delivererName; |
120 | 0 | } |
121 | ||
122 | /** | |
123 | * Gets the channels attribute. | |
124 | * @return Returns the channel. | |
125 | */ | |
126 | public String getChannel() { | |
127 | 0 | return channel; |
128 | } | |
129 | ||
130 | /** | |
131 | * Sets the channel attribute value. | |
132 | * @param channel The channel to set. | |
133 | */ | |
134 | public void setChannel(String channel) { | |
135 | 0 | this.channel = channel; |
136 | 0 | } |
137 | ||
138 | /** | |
139 | * @see java.lang.Object#toString() | |
140 | */ | |
141 | @Override | |
142 | public String toString() { | |
143 | 0 | return new ToStringBuilder(this).append("id", id) |
144 | .append("recipientId", recipientId) | |
145 | .append("delivererName", delivererName) | |
146 | .append("channel", channel) | |
147 | .toString(); | |
148 | } | |
149 | } |