01: package org.databene.domain.person;
02:
03: import org.databene.commons.StringUtil;
04:
05: import java.util.Date;
06: import java.text.DateFormat;
07:
08: /**
09: * (c) Copyright 2006 by Volker Bergmann
10: * Created: 09.06.2006 21:51:25
11: */
12: public class Person {
13:
14: private static final DateFormat df = DateFormat.getDateInstance();
15:
16: private String givenName;
17: private String familyName;
18: private Gender gender;
19: private String salutation;
20: private String title;
21: private Date birthDate;
22:
23: public String getSalutation() {
24: return salutation;
25: }
26:
27: public void setSalutation(String salutation) {
28: this .salutation = salutation;
29: }
30:
31: public String getTitle() {
32: return title;
33: }
34:
35: public void setTitle(String title) {
36: this .title = title;
37: }
38:
39: public Gender getGender() {
40: return gender;
41: }
42:
43: public void setGender(Gender gender) {
44: this .gender = gender;
45: }
46:
47: public String getGivenName() {
48: return givenName;
49: }
50:
51: public void setGivenName(String givenName) {
52: this .givenName = givenName;
53: }
54:
55: public String getFamilyName() {
56: return familyName;
57: }
58:
59: public void setFamilyName(String familyName) {
60: this .familyName = familyName;
61: }
62:
63: public Date getBirthDate() {
64: return birthDate;
65: }
66:
67: public void setBirthDate(Date birthDate) {
68: this .birthDate = birthDate;
69: }
70:
71: public String toString() {
72: return salutation + ' '
73: + (!StringUtil.isEmpty(title) ? title + " " : "")
74: + givenName + ' ' + familyName + ", *"
75: + df.format(birthDate);
76: }
77: }
|