]> git.mxchange.org Git - jcontacts-core.git/blob - src/org/mxchange/jcontacts/contact/Contact.java
Updated copyright year
[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 interface
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          * House number
212          * <p>
213          * @return the houseNumber
214          */
215         Short getContactHouseNumber ();
216
217         /**
218          * House number
219          * <p>
220          * @param houseNumber the houseNumber to set
221          */
222         void setContactHouseNumber (final Short houseNumber);
223
224         /**
225          * Setter for own contact
226          * <p>
227          * @param ownContact Own contact
228          */
229         void setContactOwnContact (final Boolean ownContact);
230
231         /**
232          * Getter for phone number
233          * <p>
234          * @return Phone number
235          */
236         DialableLandLineNumber getContactPhoneNumber ();
237
238         /**
239          * Setter for phone number
240          * <p>
241          * @param phoneNumber Phone number
242          */
243         void setContactPhoneNumber (final DialableLandLineNumber phoneNumber);
244
245         /**
246          * Street
247          * <p>
248          * @return the street
249          */
250         String getContactStreet ();
251
252         /**
253          * Street
254          * <p>
255          * @param street the street to set
256          */
257         void setContactStreet (final String street);
258
259         /**
260          * Getter for contact's title
261          * <p>
262          * @return Contact's title
263          */
264         String getContactTitle ();
265
266         /**
267          * Setter for contact's title
268          * <p>
269          * @param contactTitle Contact's title
270          */
271         void setContactTitle (final String contactTitle);
272
273         /**
274          * Getter for "updated" timestamp
275          * <p>
276          * @return "updated" timestamp
277          */
278         Calendar getContactUpdated ();
279
280         /**
281          * Getter for "updated" timestamp
282          * <p>
283          * @param updated "updated" timestamp
284          */
285         void setContactUpdated (final Calendar updated);
286
287         /**
288          * ZIP code
289          * <p>
290          * @return the zipCode
291          */
292         Integer getContactZipCode ();
293
294         /**
295          * ZIP code
296          * <p>
297          * @param zipCode the zipCode to set
298          */
299         void setContactZipCode (final Integer zipCode);
300
301         /**
302          * Checks whether the contact is user's own data
303          * <p>
304          * @return Own data?
305          */
306         Boolean isOwnContact ();
307
308         /**
309          * Check if contacts are same or throw an exception
310          * <p>
311          * @param object Other possible contact class
312          * <p>
313          * @return Whether both contacts are same TODO Needs a lot improvements
314          */
315         @Override
316         boolean equals (final Object object);
317
318         @Override
319         int hashCode ();
320 }