001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.module.endow.businessobject;
017
018 import java.sql.Date;
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.module.endow.EndowPropertyConstants;
022 import org.kuali.kfs.sys.KFSConstants;
023 import org.kuali.rice.kns.bo.Country;
024 import org.kuali.rice.kns.bo.Inactivateable;
025 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
026
027 public class Donor extends PersistableBusinessObjectBase implements Inactivateable {
028
029 private String donorID;
030
031 // name
032 private String firstName;
033 private String middleName;
034 private String lastName;
035
036 // address
037 private String address1;
038 private String address2;
039 private String address3;
040 private String city;
041 private String state;
042 private String postalCode;
043 private String country; // should reference org.kuali.rice.kns.bo.Country later
044
045 private String phoneNumber;
046
047 private String individualSalutation;
048 private String individualMailLabel;
049 private String jointSalutation;
050 private String jointMailLabel;
051
052 private String developmentOfficer;
053
054 private Date deceasedDate;
055
056 private String firstCorporateContact;
057 private String firstContactTitle;
058 private String secondCorporateContact;
059 private String secondContactTitle;
060
061 private String comments;
062
063 private boolean active;
064
065 /**
066 * Gets the donorID attribute.
067 *
068 * @return Returns the donorID.
069 */
070 public String getDonorID() {
071 return donorID;
072 }
073
074 /**
075 * Sets the donorID attribute value.
076 *
077 * @param donorID The donorID to set.
078 */
079 public void setDonorID(String donorID) {
080 this.donorID = donorID;
081 }
082
083 /**
084 * Gets the firstName attribute.
085 *
086 * @return Returns the firstName.
087 */
088 public String getFirstName() {
089 return firstName;
090 }
091
092 /**
093 * Sets the firstName attribute value.
094 *
095 * @param firstName The firstName to set.
096 */
097 public void setFirstName(String firstName) {
098 this.firstName = firstName;
099 }
100
101 /**
102 * Gets the middleName attribute.
103 *
104 * @return Returns the middleName.
105 */
106 public String getMiddleName() {
107 return middleName;
108 }
109
110 /**
111 * Sets the middleName attribute value.
112 *
113 * @param middleName The middleName to set.
114 */
115 public void setMiddleName(String middleName) {
116 this.middleName = middleName;
117 }
118
119 /**
120 * Gets the lastName attribute.
121 *
122 * @return Returns the lastName.
123 */
124 public String getLastName() {
125 return lastName;
126 }
127
128 /**
129 * Sets the lastName attribute value.
130 *
131 * @param lastName The lastName to set.
132 */
133 public void setLastName(String lastName) {
134 this.lastName = lastName;
135 }
136
137 /**
138 * Gets the address1 attribute.
139 *
140 * @return Returns the address1.
141 */
142 public String getAddress1() {
143 return address1;
144 }
145
146 /**
147 * Sets the address1 attribute value.
148 *
149 * @param address1 The address1 to set.
150 */
151 public void setAddress1(String address1) {
152 this.address1 = address1;
153 }
154
155 /**
156 * Gets the address2 attribute.
157 *
158 * @return Returns the address2.
159 */
160 public String getAddress2() {
161 return address2;
162 }
163
164 /**
165 * Sets the address2 attribute value.
166 *
167 * @param address2 The address2 to set.
168 */
169 public void setAddress2(String address2) {
170 this.address2 = address2;
171 }
172
173 /**
174 * Gets the address3 attribute.
175 *
176 * @return Returns the address3.
177 */
178 public String getAddress3() {
179 return address3;
180 }
181
182 /**
183 * Sets the address3 attribute value.
184 *
185 * @param address3 The address3 to set.
186 */
187 public void setAddress3(String address3) {
188 this.address3 = address3;
189 }
190
191 /**
192 * Gets the city attribute.
193 *
194 * @return Returns the city.
195 */
196 public String getCity() {
197 return city;
198 }
199
200 /**
201 * Sets the city attribute value.
202 *
203 * @param city The city to set.
204 */
205 public void setCity(String city) {
206 this.city = city;
207 }
208
209 /**
210 * Gets the state attribute.
211 *
212 * @return Returns the state.
213 */
214 public String getState() {
215 return state;
216 }
217
218 /**
219 * Sets the state attribute value.
220 *
221 * @param state The state to set.
222 */
223 public void setState(String state) {
224 this.state = state;
225 }
226
227 /**
228 * Gets the postalCode attribute.
229 *
230 * @return Returns the postalCode.
231 */
232 public String getPostalCode() {
233 return postalCode;
234 }
235
236 /**
237 * Sets the postalCode attribute value.
238 *
239 * @param postalCode The postalCode to set.
240 */
241 public void setPostalCode(String postalCode) {
242 this.postalCode = postalCode;
243 }
244
245 /**
246 * Gets the country attribute.
247 *
248 * @return Returns the country.
249 */
250 public String getCountry() {
251 return country;
252 }
253
254 /**
255 * Sets the country attribute value.
256 *
257 * @param country The country to set.
258 */
259 public void setCountry(String country) {
260 this.country = country;
261 }
262
263 /**
264 * Gets the phoneNumber attribute.
265 *
266 * @return Returns the phoneNumber.
267 */
268 public String getPhoneNumber() {
269 return phoneNumber;
270 }
271
272 /**
273 * Sets the phoneNumber attribute value.
274 *
275 * @param phoneNumber The phoneNumber to set.
276 */
277 public void setPhoneNumber(String phoneNumber) {
278 this.phoneNumber = phoneNumber;
279 }
280
281 /**
282 * Gets the individualSalutation attribute.
283 *
284 * @return Returns the individualSalutation.
285 */
286 public String getIndividualSalutation() {
287 return individualSalutation;
288 }
289
290 /**
291 * Sets the individualSalutation attribute value.
292 *
293 * @param individualSalutation The individualSalutation to set.
294 */
295 public void setIndividualSalutation(String individualSalutation) {
296 this.individualSalutation = individualSalutation;
297 }
298
299 /**
300 * Gets the individualMailLabel attribute.
301 *
302 * @return Returns the individualMailLabel.
303 */
304 public String getIndividualMailLabel() {
305 return individualMailLabel;
306 }
307
308 /**
309 * Sets the individualMailLabel attribute value.
310 *
311 * @param individualMailLabel The individualMailLabel to set.
312 */
313 public void setIndividualMailLabel(String individualMailLabel) {
314 this.individualMailLabel = individualMailLabel;
315 }
316
317 /**
318 * Gets the jointSalutation attribute.
319 *
320 * @return Returns the jointSalutation.
321 */
322 public String getJointSalutation() {
323 return jointSalutation;
324 }
325
326 /**
327 * Sets the jointSalutation attribute value.
328 *
329 * @param jointSalutation The jointSalutation to set.
330 */
331 public void setJointSalutation(String jointSalutation) {
332 this.jointSalutation = jointSalutation;
333 }
334
335 /**
336 * Gets the jointMailLabel attribute.
337 *
338 * @return Returns the jointMailLabel.
339 */
340 public String getJointMailLabel() {
341 return jointMailLabel;
342 }
343
344 /**
345 * Sets the jointMailLabel attribute value.
346 *
347 * @param jointMailLabel The jointMailLabel to set.
348 */
349 public void setJointMailLabel(String jointMailLabel) {
350 this.jointMailLabel = jointMailLabel;
351 }
352
353 /**
354 * Gets the developmentOfficer attribute.
355 *
356 * @return Returns the developmentOfficer.
357 */
358 public String getDevelopmentOfficer() {
359 return developmentOfficer;
360 }
361
362 /**
363 * Sets the developmentOfficer attribute value.
364 *
365 * @param developmentOfficer The developmentOfficer to set.
366 */
367 public void setDevelopmentOfficer(String developmentOfficer) {
368 this.developmentOfficer = developmentOfficer;
369 }
370
371 /**
372 * Gets the deceasedDate attribute.
373 *
374 * @return Returns the deceasedDate.
375 */
376 public Date getDeceasedDate() {
377 return deceasedDate;
378 }
379
380 /**
381 * Sets the deceasedDate attribute value.
382 *
383 * @param deceasedDate The deceasedDate to set.
384 */
385 public void setDeceasedDate(Date deceasedDate) {
386 this.deceasedDate = deceasedDate;
387 }
388
389 /**
390 * Gets the firstCorporateContact attribute.
391 *
392 * @return Returns the firstCorporateContact.
393 */
394 public String getFirstCorporateContact() {
395 return firstCorporateContact;
396 }
397
398 /**
399 * Sets the firstCorporateContact attribute value.
400 *
401 * @param firstCorporateContact The firstCorporateContact to set.
402 */
403 public void setFirstCorporateContact(String firstCorporateContact) {
404 this.firstCorporateContact = firstCorporateContact;
405 }
406
407 /**
408 * Gets the firstContactTitle attribute.
409 *
410 * @return Returns the firstContactTitle.
411 */
412 public String getFirstContactTitle() {
413 return firstContactTitle;
414 }
415
416 /**
417 * Sets the firstContactTitle attribute value.
418 *
419 * @param firstContactTitle The firstContactTitle to set.
420 */
421 public void setFirstContactTitle(String firstContactTitle) {
422 this.firstContactTitle = firstContactTitle;
423 }
424
425 /**
426 * Gets the secondCorporateContact attribute.
427 *
428 * @return Returns the secondCorporateContact.
429 */
430 public String getSecondCorporateContact() {
431 return secondCorporateContact;
432 }
433
434 /**
435 * Sets the secondCorporateContact attribute value.
436 *
437 * @param secondCorporateContact The secondCorporateContact to set.
438 */
439 public void setSecondCorporateContact(String secondCorporateContact) {
440 this.secondCorporateContact = secondCorporateContact;
441 }
442
443 /**
444 * Gets the secondContactTitle attribute.
445 *
446 * @return Returns the secondContactTitle.
447 */
448 public String getSecondContactTitle() {
449 return secondContactTitle;
450 }
451
452 /**
453 * Sets the secondContactTitle attribute value.
454 *
455 * @param secondContactTitle The secondContactTitle to set.
456 */
457 public void setSecondContactTitle(String secondContactTitle) {
458 this.secondContactTitle = secondContactTitle;
459 }
460
461 /**
462 * Gets the comments attribute.
463 *
464 * @return Returns the comments.
465 */
466 public String getComments() {
467 return comments;
468 }
469
470 /**
471 * Sets the comments attribute value.
472 *
473 * @param comments The comments to set.
474 */
475 public void setComments(String comments) {
476 this.comments = comments;
477 }
478
479 /**
480 * Gets the active attribute.
481 *
482 * @return Returns the active.
483 */
484 public boolean isActive() {
485 return active;
486 }
487
488 /**
489 * Sets the active attribute value.
490 *
491 * @param active The active to set.
492 */
493 public void setActive(boolean active) {
494 this.active = active;
495 }
496
497 /**
498 * Gets the donor's full name: First name + middle name + last name
499 *
500 * @return donor's full name
501 */
502 public String getFullName() {
503 String firstName = getFirstName() == null ? KFSConstants.EMPTY_STRING : getFirstName() + " ";
504 String middleName = getMiddleName() == null ? KFSConstants.EMPTY_STRING : getMiddleName();
505 String lastName = getLastName() == null ? KFSConstants.EMPTY_STRING : " " + getLastName();
506
507 String fullName = firstName + middleName + lastName;
508
509 return fullName;
510 }
511
512 /**
513 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
514 */
515 @Override
516 protected LinkedHashMap<String, String> toStringMapper() {
517 LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
518 m.put(EndowPropertyConstants.DONR_ID, this.donorID);
519 return m;
520 }
521
522 }