Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
KimEntityPhoneInfo |
|
| 1.0384615384615385;1.038 |
1 | /* | |
2 | * Copyright 2007-2009 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.kim.bo.entity.dto; | |
17 | ||
18 | import org.kuali.rice.kim.bo.entity.KimEntityPhone; | |
19 | ||
20 | /** | |
21 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
22 | */ | |
23 | public class KimEntityPhoneInfo extends KimDefaultableInfo implements KimEntityPhone { | |
24 | ||
25 | private static final long serialVersionUID = 1L; | |
26 | ||
27 | protected String entityPhoneId; | |
28 | protected String entityTypeCode; | |
29 | protected String phoneTypeCode; | |
30 | protected String phoneNumber; | |
31 | protected String extensionNumber; | |
32 | protected String countryCode; | |
33 | ||
34 | protected String phoneNumberUnmasked; | |
35 | protected String extensionNumberUnmasked; | |
36 | protected String countryCodeUnmasked; | |
37 | ||
38 | protected String formattedPhoneNumber; | |
39 | protected String formattedPhoneNumberUnmasked; | |
40 | ||
41 | 0 | protected boolean suppressPhone = false; |
42 | ||
43 | ||
44 | /** | |
45 | * constructs an empty KimEntityPhoneInfo | |
46 | */ | |
47 | public KimEntityPhoneInfo() { | |
48 | 0 | super(); |
49 | 0 | active = true; |
50 | 0 | } |
51 | ||
52 | /** | |
53 | * constructs a {@link KimEntityPhoneInfo} derived from the given {@link KimEntityPhone} | |
54 | */ | |
55 | public KimEntityPhoneInfo( KimEntityPhone phone ) { | |
56 | 0 | this(); |
57 | 0 | if ( phone != null ) { |
58 | 0 | this.entityPhoneId = phone.getEntityPhoneId(); |
59 | 0 | this.entityTypeCode = phone.getEntityTypeCode(); |
60 | 0 | this.phoneTypeCode = phone.getPhoneTypeCode(); |
61 | 0 | this.phoneNumber = phone.getPhoneNumber(); |
62 | 0 | this.extensionNumber = phone.getExtensionNumber(); |
63 | 0 | this.countryCode = phone.getCountryCodeUnmasked(); |
64 | 0 | this.dflt = phone.isDefault(); |
65 | 0 | this.active = phone.isActive(); |
66 | 0 | this.suppressPhone = phone.isSuppressPhone(); |
67 | ||
68 | 0 | this.phoneNumberUnmasked = phone.getPhoneNumberUnmasked(); |
69 | 0 | this.extensionNumberUnmasked = phone.getExtensionNumberUnmasked(); |
70 | 0 | this.countryCodeUnmasked = phone.getCountryCodeUnmasked(); |
71 | 0 | this.formattedPhoneNumber = phone.getFormattedPhoneNumber(); |
72 | 0 | this.formattedPhoneNumberUnmasked = phone.getFormattedPhoneNumberUnmasked(); |
73 | } | |
74 | 0 | } |
75 | ||
76 | /** | |
77 | * {@inheritDoc} | |
78 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getEntityPhoneId() | |
79 | */ | |
80 | public String getEntityPhoneId() { | |
81 | 0 | return entityPhoneId; |
82 | } | |
83 | ||
84 | /** | |
85 | * @param entityPhoneId the entityPhoneId to set | |
86 | */ | |
87 | public void setEntityPhoneId(String entityPhoneId) { | |
88 | 0 | this.entityPhoneId = entityPhoneId; |
89 | 0 | } |
90 | ||
91 | /** | |
92 | * {@inheritDoc} | |
93 | * @see org.kuali.rice.kim.bo.entity.KimDefaultableEntityTypeData#getEntityTypeCode() | |
94 | */ | |
95 | public String getEntityTypeCode() { | |
96 | 0 | return entityTypeCode; |
97 | } | |
98 | ||
99 | /** | |
100 | * @param entityTypeCode the entityTypeCode to set | |
101 | */ | |
102 | public void setEntityTypeCode(String entityTypeCode) { | |
103 | 0 | this.entityTypeCode = entityTypeCode; |
104 | 0 | } |
105 | ||
106 | /** | |
107 | * {@inheritDoc} | |
108 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getPhoneTypeCode() | |
109 | */ | |
110 | public String getPhoneTypeCode() { | |
111 | 0 | return phoneTypeCode; |
112 | } | |
113 | ||
114 | /** | |
115 | * @param phoneTypeCode the phoneTypeCode to set | |
116 | */ | |
117 | public void setPhoneTypeCode(String phoneTypeCode) { | |
118 | 0 | this.phoneTypeCode = phoneTypeCode; |
119 | 0 | } |
120 | ||
121 | /** | |
122 | * {@inheritDoc} | |
123 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getPhoneNumber() | |
124 | */ | |
125 | public String getPhoneNumber() { | |
126 | 0 | return phoneNumber; |
127 | } | |
128 | ||
129 | /** | |
130 | * @param phoneNumber the phoneNumber to set | |
131 | */ | |
132 | public void setPhoneNumber(String phoneNumber) { | |
133 | 0 | this.phoneNumber = phoneNumber; |
134 | 0 | } |
135 | ||
136 | /** | |
137 | * {@inheritDoc} | |
138 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getExtensionNumber() | |
139 | */ | |
140 | public String getExtensionNumber() { | |
141 | 0 | return extensionNumber; |
142 | } | |
143 | ||
144 | /** | |
145 | * @param extensionNumber the extensionNumber to set | |
146 | */ | |
147 | public void setExtensionNumber(String extensionNumber) { | |
148 | 0 | this.extensionNumber = extensionNumber; |
149 | 0 | } |
150 | ||
151 | /** | |
152 | * {@inheritDoc} | |
153 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getCountryCode() | |
154 | */ | |
155 | public String getCountryCode() { | |
156 | 0 | return countryCode; |
157 | } | |
158 | ||
159 | /** | |
160 | * @param countryCode the countryCode to set | |
161 | */ | |
162 | public void setCountryCode(String countryCode) { | |
163 | 0 | this.countryCode = countryCode; |
164 | 0 | } |
165 | ||
166 | /** | |
167 | * {@inheritDoc} | |
168 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getPhoneNumberUnmasked() | |
169 | */ | |
170 | public String getPhoneNumberUnmasked() { | |
171 | 0 | return phoneNumberUnmasked; |
172 | } | |
173 | ||
174 | /** | |
175 | * @param phoneNumberUnmasked the phoneNumberUnmasked to set | |
176 | */ | |
177 | public void setPhoneNumberUnmasked(String phoneNumberUnmasked) { | |
178 | 0 | this.phoneNumberUnmasked = phoneNumberUnmasked; |
179 | 0 | } |
180 | ||
181 | /** | |
182 | * {@inheritDoc} | |
183 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getExtensionNumberUnmasked() | |
184 | */ | |
185 | public String getExtensionNumberUnmasked() { | |
186 | 0 | return extensionNumberUnmasked; |
187 | } | |
188 | ||
189 | /** | |
190 | * @param extensionNumberUnmasked the extensionNumberUnmasked to set | |
191 | */ | |
192 | public void setExtensionNumberUnmasked(String extensionNumberUnmasked) { | |
193 | 0 | this.extensionNumberUnmasked = extensionNumberUnmasked; |
194 | 0 | } |
195 | ||
196 | /** | |
197 | * {@inheritDoc} | |
198 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getCountryCodeUnmasked() | |
199 | */ | |
200 | public String getCountryCodeUnmasked() { | |
201 | 0 | return countryCodeUnmasked; |
202 | } | |
203 | ||
204 | /** | |
205 | * @param countryCodeUnmasked the countryCodeUnmasked to set | |
206 | */ | |
207 | public void setCountryCodeUnmasked(String countryCodeUnmasked) { | |
208 | 0 | this.countryCodeUnmasked = countryCodeUnmasked; |
209 | 0 | } |
210 | ||
211 | /** | |
212 | * {@inheritDoc} | |
213 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getFormattedPhoneNumber() | |
214 | */ | |
215 | public String getFormattedPhoneNumber() { | |
216 | 0 | return formattedPhoneNumber; |
217 | } | |
218 | ||
219 | /** | |
220 | * @param formattedPhoneNumber the formattedPhoneNumber to set | |
221 | */ | |
222 | public void setFormattedPhoneNumber(String formattedPhoneNumber) { | |
223 | 0 | this.formattedPhoneNumber = formattedPhoneNumber; |
224 | 0 | } |
225 | ||
226 | /** | |
227 | * {@inheritDoc} | |
228 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#getFormattedPhoneNumberUnmasked() | |
229 | */ | |
230 | public String getFormattedPhoneNumberUnmasked() { | |
231 | 0 | return formattedPhoneNumberUnmasked; |
232 | } | |
233 | ||
234 | /** | |
235 | * @param formattedPhoneNumberUnmasked the formattedPhoneNumberUnmasked to set | |
236 | */ | |
237 | public void setFormattedPhoneNumberUnmasked(String formattedPhoneNumberUnmasked) { | |
238 | 0 | this.formattedPhoneNumberUnmasked = formattedPhoneNumberUnmasked; |
239 | 0 | } |
240 | ||
241 | /** | |
242 | * {@inheritDoc} | |
243 | * @see org.kuali.rice.kim.bo.entity.KimEntityPhone#isSuppressPhone() | |
244 | */ | |
245 | public boolean isSuppressPhone() { | |
246 | 0 | return this.suppressPhone; |
247 | } | |
248 | ||
249 | /** | |
250 | * @param suppressPhone the suppressPhone to set | |
251 | */ | |
252 | public void setSuppressPhone(boolean suppressPhone) { | |
253 | 0 | this.suppressPhone = suppressPhone; |
254 | 0 | } |
255 | ||
256 | } |