]> git.mxchange.org Git - jcontacts-core.git/blob - src/org/mxchange/jcontacts/model/contact/Contact.java
Continued:
[jcontacts-core.git] / src / org / mxchange / jcontacts / model / contact / Contact.java
1 /*
2  * Copyright (C) 2016, 2017 Roland Häder
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcontacts.model.contact;
18
19 import java.io.Serializable;
20 import java.util.Calendar;
21 import java.util.Date;
22 import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
23 import org.mxchange.jcountry.model.data.Country;
24 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
25 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
26 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
27
28 /**
29  * A general contact POJI
30  * <p>
31  * @author Roland Häder<roland@mxchange.org>
32  */
33 public interface Contact extends Serializable {
34
35         /**
36          * Birth day
37          * <p>
38          * @return the birthday
39          */
40         Date getContactBirthday ();
41
42         /**
43          * Birth day
44          * <p>
45          * @param birthday the birthday to set
46          */
47         void setContactBirthday (final Date birthday);
48
49         /**
50          * Getter for mobile number
51          * <p>
52          * @return Mobile number
53          */
54         DialableMobileNumber getContactMobileNumber ();
55
56         /**
57          * Setter for mobile number
58          * <p>
59          * @param mobileNumber Mobile number
60          */
61         void setContactMobileNumber (final DialableMobileNumber mobileNumber);
62
63         /**
64          * City
65          * <p>
66          * @return the city
67          */
68         String getContactCity ();
69
70         /**
71          * City
72          * <p>
73          * @param city the city to set
74          */
75         void setContactCity (final String city);
76
77         /**
78          * Comments
79          * <p>
80          * @return the comment
81          */
82         String getContactComment ();
83
84         /**
85          * Comments
86          * <p>
87          * @param comment the comment to set
88          */
89         void setContactComment (final String comment);
90
91         /**
92          * Id number
93          * <p>
94          * @return the contactId
95          */
96         Long getContactId ();
97
98         /**
99          * Id number
100          * <p>
101          * @param id the contactId to set
102          */
103         void setContactId (final Long id);
104
105         /**
106          * Country code
107          * <p>
108          * @return the countryCode
109          */
110         Country getContactCountry ();
111
112         /**
113          * Country code
114          * <p>
115          * @param contactCountry the countryCode to set
116          */
117         void setContactCountry (final Country contactCountry);
118
119         /**
120          * Getter for "created" timestamp
121          * <p>
122          * @return "created" timestamp
123          */
124         Calendar getContactCreated ();
125
126         /**
127          * Setter for "created" timestamp
128          * <p>
129          * @param created "created" timestamp
130          */
131         void setContactCreated (final Calendar created);
132
133         /**
134          * Email address
135          * <p>
136          * @return the emailAddress
137          */
138         String getContactEmailAddress ();
139
140         /**
141          * Email address
142          * <p>
143          * @param emailAddress the emailAddress to set
144          */
145         void setContactEmailAddress (final String emailAddress);
146
147         /**
148          * Family name
149          * <p>
150          * @return the familyName
151          */
152         String getContactFamilyName ();
153
154         /**
155          * Family name
156          * <p>
157          * @param familyName the familyName to set
158          */
159         void setContactFamilyName (final String familyName);
160
161         /**
162          * Fax number
163          * <p>
164          * @return the faxNumber
165          */
166         DialableFaxNumber getContactFaxNumber ();
167
168         /**
169          * Fax number
170          * <p>
171          * @param faxNumber the faxNumber to set
172          */
173         void setContactFaxNumber (final DialableFaxNumber faxNumber);
174
175         /**
176          * First name
177          * <p>
178          * @return the first name
179          */
180         String getContactFirstName ();
181
182         /**
183          * First name
184          * <p>
185          * @param firstName the first name to set
186          */
187         void setContactFirstName (final String firstName);
188
189         /**
190          * Getter for personal title
191          * <p>
192          * @return Personal title
193          */
194         PersonalTitle getContactPersonalTitle ();
195
196         /**
197          * Setter for personal title
198          * <p>
199          * @param personalTitle Personal title
200          */
201         void setContactPersonalTitle (final PersonalTitle personalTitle);
202
203         /**
204          * House number
205          * <p>
206          * @return the houseNumber
207          */
208         Short getContactHouseNumber ();
209
210         /**
211          * House number
212          * <p>
213          * @param houseNumber the houseNumber to set
214          */
215         void setContactHouseNumber (final Short houseNumber);
216
217         /**
218          * Getter for house number extension, example: 123a 'a' is then the
219          * extension and 123 is the house number.
220          * <p>
221          * @return House number extension
222          */
223         String getContactHouseNumberExtension ();
224
225         /**
226          * Setter for house number extension
227          * <p>
228          * @param contactHouseNumberExtension House number extension
229          */
230         void setContactHouseNumberExtension (final String contactHouseNumberExtension);
231
232         /**
233          * Setter for own contact
234          * <p>
235          * @param ownContact Own contact
236          */
237         void setContactOwnContact (final Boolean ownContact);
238
239         /**
240          * Getter for phone number
241          * <p>
242          * @return Phone number
243          */
244         DialableLandLineNumber getContactLandLineNumber ();
245
246         /**
247          * Setter for phone number
248          * <p>
249          * @param phoneNumber Phone number
250          */
251         void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
252
253         /**
254          * Street
255          * <p>
256          * @return the street
257          */
258         String getContactStreet ();
259
260         /**
261          * Street
262          * <p>
263          * @param street the street to set
264          */
265         void setContactStreet (final String street);
266
267         /**
268          * Getter for contact's title
269          * <p>
270          * @return Contact's title
271          */
272         String getContactTitle ();
273
274         /**
275          * Setter for contact's title
276          * <p>
277          * @param contactTitle Contact's title
278          */
279         void setContactTitle (final String contactTitle);
280
281         /**
282          * Getter for "updated" timestamp
283          * <p>
284          * @return "updated" timestamp
285          */
286         Calendar getContactUpdated ();
287
288         /**
289          * Getter for "updated" timestamp
290          * <p>
291          * @param updated "updated" timestamp
292          */
293         void setContactUpdated (final Calendar updated);
294
295         /**
296          * ZIP code
297          * <p>
298          * @return the zipCode
299          */
300         Integer getContactZipCode ();
301
302         /**
303          * ZIP code
304          * <p>
305          * @param zipCode the zipCode to set
306          */
307         void setContactZipCode (final Integer zipCode);
308
309         /**
310          * Checks whether the contact is user's own data
311          * <p>
312          * @return Own data?
313          */
314         Boolean isOwnContact ();
315
316         /**
317          * Check if contacts are same or throw an exception
318          * <p>
319          * @param object Other possible contact class
320          * <p>
321          * @return Whether both contacts are same
322          */
323         @Override
324         boolean equals (final Object object);
325
326         @Override
327         int hashCode ();
328
329 }