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