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