1 | package gov.hhs.fha.nhinc.connectmgr.data;
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * @author westbergl
|
---|
5 | * @version 1.0
|
---|
6 | * @created 20-Oct-2008 12:06:57 PM
|
---|
7 | */
|
---|
8 | public class CMContact
|
---|
9 | {
|
---|
10 |
|
---|
11 | private CMContactDescriptions descriptions = null;
|
---|
12 | private CMPersonNames personNames = null;
|
---|
13 | private CMPhones phones = null;
|
---|
14 | private CMEmails emails = null;
|
---|
15 | private CMAddresses addresses = null;
|
---|
16 |
|
---|
17 | /**
|
---|
18 | * Default Constructor.
|
---|
19 | */
|
---|
20 | public CMContact()
|
---|
21 | {
|
---|
22 | clear();
|
---|
23 | }
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Clear the contents of this and set it to a default state.
|
---|
27 | */
|
---|
28 | public void clear()
|
---|
29 | {
|
---|
30 | descriptions = null;
|
---|
31 | personNames = null;
|
---|
32 | phones = null;
|
---|
33 | emails = null;
|
---|
34 | addresses = null;
|
---|
35 | }
|
---|
36 |
|
---|
37 | /**
|
---|
38 | * Returns true of the contents of the object are the same as the one
|
---|
39 | * passed in.
|
---|
40 | *
|
---|
41 | * @param oCompare The object to compare.
|
---|
42 | * @return TRUE if the contents are the same as the one passed in.
|
---|
43 | */
|
---|
44 | public boolean equals(CMContact oCompare)
|
---|
45 | {
|
---|
46 | if (!this.descriptions.equals(oCompare.descriptions))
|
---|
47 | {
|
---|
48 | return false;
|
---|
49 | }
|
---|
50 |
|
---|
51 | if (!this.personNames.equals(oCompare.personNames))
|
---|
52 | {
|
---|
53 | return false;
|
---|
54 | }
|
---|
55 |
|
---|
56 | if (!this.phones.equals(oCompare.phones))
|
---|
57 | {
|
---|
58 | return false;
|
---|
59 | }
|
---|
60 |
|
---|
61 | if (!this.emails.equals(oCompare.emails))
|
---|
62 | {
|
---|
63 | return false;
|
---|
64 | }
|
---|
65 |
|
---|
66 | if (!this.addresses.equals(oCompare.addresses))
|
---|
67 | {
|
---|
68 | return false;
|
---|
69 | }
|
---|
70 |
|
---|
71 | // If we got here then everything is the same...
|
---|
72 | //----------------------------------------------
|
---|
73 | return true;
|
---|
74 | }
|
---|
75 |
|
---|
76 |
|
---|
77 | /**
|
---|
78 | * Returns the list of addresses for this contact.
|
---|
79 | *
|
---|
80 | * @return The list of addresses for this contact.
|
---|
81 | */
|
---|
82 | public CMAddresses getAddresses()
|
---|
83 | {
|
---|
84 | return addresses;
|
---|
85 | }
|
---|
86 |
|
---|
87 | /**
|
---|
88 | * Sets the list of addresses for this contact.
|
---|
89 | *
|
---|
90 | * @param addresses The list of addresses for this contact.
|
---|
91 | */
|
---|
92 | public void setAddresses(CMAddresses addresses)
|
---|
93 | {
|
---|
94 | this.addresses = addresses;
|
---|
95 | }
|
---|
96 |
|
---|
97 | /**
|
---|
98 | * Returns the set of descriptions for this contact.
|
---|
99 | *
|
---|
100 | * @return The set of descriptions for this contact.
|
---|
101 | */
|
---|
102 | public CMContactDescriptions getDescriptions()
|
---|
103 | {
|
---|
104 | return descriptions;
|
---|
105 | }
|
---|
106 |
|
---|
107 | /**
|
---|
108 | * Sets the set of descriptions for this contact.
|
---|
109 | *
|
---|
110 | * @param descriptions The set of descriptions for this contact.
|
---|
111 | */
|
---|
112 | public void setDescriptions(CMContactDescriptions descriptions)
|
---|
113 | {
|
---|
114 | this.descriptions = descriptions;
|
---|
115 | }
|
---|
116 |
|
---|
117 | /**
|
---|
118 | * Returns the email addresses for this contact.
|
---|
119 | *
|
---|
120 | * @return The email addresses for this contact.
|
---|
121 | */
|
---|
122 | public CMEmails getEmails()
|
---|
123 | {
|
---|
124 | return emails;
|
---|
125 | }
|
---|
126 |
|
---|
127 | /**
|
---|
128 | * Sets the email addresses for this contact.
|
---|
129 | *
|
---|
130 | * @param emails The email addresses for this contact.
|
---|
131 | */
|
---|
132 | public void setEmails(CMEmails emails)
|
---|
133 | {
|
---|
134 | this.emails = emails;
|
---|
135 | }
|
---|
136 |
|
---|
137 | /**
|
---|
138 | * Returns the names for this contact.
|
---|
139 | *
|
---|
140 | * @return The names for this contact.
|
---|
141 | */
|
---|
142 | public CMPersonNames getPersonNames()
|
---|
143 | {
|
---|
144 | return personNames;
|
---|
145 | }
|
---|
146 |
|
---|
147 | /**
|
---|
148 | * Sets the names for this contact.
|
---|
149 | *
|
---|
150 | * @return The names for this contact.
|
---|
151 | */
|
---|
152 | public void setPersonNames(CMPersonNames personNames)
|
---|
153 | {
|
---|
154 | this.personNames = personNames;
|
---|
155 | }
|
---|
156 |
|
---|
157 | /**
|
---|
158 | * Returns the phone numbers for this contact.
|
---|
159 | *
|
---|
160 | * @return The phone numbers for this contact.
|
---|
161 | */
|
---|
162 | public CMPhones getPhones()
|
---|
163 | {
|
---|
164 | return phones;
|
---|
165 | }
|
---|
166 |
|
---|
167 | /**
|
---|
168 | * Sets the phone numbers for this contact.
|
---|
169 | *
|
---|
170 | * @param phones The phone numbers for this contact.
|
---|
171 | */
|
---|
172 | public void setPhones(CMPhones phones)
|
---|
173 | {
|
---|
174 | this.phones = phones;
|
---|
175 | }
|
---|
176 | }
|
---|