2 * Copyright (C) 2016 - 2020 Free Software Foundation
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.
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.
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/>.
17 package org.mxchange.jcontacts.model.contact;
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;
28 * A general contact POJI
30 * @author Roland Häder<roland@mxchange.org>
32 public interface Contact extends Comparable<Contact>, Serializable {
37 * @return the birthday
39 Date getContactBirthday ();
44 * @param birthday the birthday to set
46 void setContactBirthday (final Date birthday);
49 * Getter for mobile number
51 * @return Mobile number
53 DialableMobileNumber getContactMobileNumber ();
56 * Setter for mobile number
58 * @param mobileNumber Mobile number
60 void setContactMobileNumber (final DialableMobileNumber mobileNumber);
67 String getContactCity ();
72 * @param city the city to set
74 void setContactCity (final String city);
81 String getContactComment ();
86 * @param comment the comment to set
88 void setContactComment (final String comment);
93 * @return the contactId
100 * @param id the contactId to set
102 void setContactId (final Long id);
107 * @return the countryCode
109 Country getContactCountry ();
114 * @param contactCountry the countryCode to set
116 void setContactCountry (final Country contactCountry);
119 * Getter for "created" timestamp
121 * @return "created" timestamp
123 Date getContactEntryCreated ();
126 * Setter for "created" timestamp
128 * @param contactEntryCreated "created" timestamp
130 void setContactEntryCreated (final Date contactEntryCreated);
133 * Getter for "updated" timestamp
135 * @return "updated" timestamp
137 Date getContactEntryUpdated ();
140 * Getter for "updated" timestamp
142 * @param contactEntryUpdated "updated" timestamp
144 void setContactEntryUpdated (final Date contactEntryUpdated);
149 * @return the emailAddress
151 String getContactEmailAddress ();
156 * @param emailAddress the emailAddress to set
158 void setContactEmailAddress (final String emailAddress);
163 * @return the familyName
165 String getContactFamilyName ();
170 * @param familyName the familyName to set
172 void setContactFamilyName (final String familyName);
177 * @return the faxNumber
179 DialableFaxNumber getContactFaxNumber ();
184 * @param faxNumber the faxNumber to set
186 void setContactFaxNumber (final DialableFaxNumber faxNumber);
191 * @return the first name
193 String getContactFirstName ();
198 * @param firstName the first name to set
200 void setContactFirstName (final String firstName);
203 * Getter for personal title
205 * @return Personal title
207 PersonalTitle getContactPersonalTitle ();
210 * Setter for personal title
212 * @param personalTitle Personal title
214 void setContactPersonalTitle (final PersonalTitle personalTitle);
219 * @return the houseNumber
221 Short getContactHouseNumber ();
226 * @param houseNumber the houseNumber to set
228 void setContactHouseNumber (final Short houseNumber);
231 * Getter for house number extension, example: 123a 'a' is then the
232 * extension and 123 is the house number.
234 * @return House number extension
236 String getContactHouseNumberExtension ();
239 * Setter for house number extension
241 * @param contactHouseNumberExtension House number extension
243 void setContactHouseNumberExtension (final String contactHouseNumberExtension);
246 * Setter for own contact
248 * @param ownContact Own contact
250 void setContactOwnContact (final Boolean ownContact);
253 * Getter for phone number
255 * @return Phone number
257 DialableLandLineNumber getContactLandLineNumber ();
260 * Setter for phone number
262 * @param phoneNumber Phone number
264 void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
271 String getContactStreet ();
276 * @param street the street to set
278 void setContactStreet (final String street);
281 * Getter for contact's title
283 * @return Contact's title
285 String getContactTitle ();
288 * Setter for contact's title
290 * @param contactTitle Contact's title
292 void setContactTitle (final String contactTitle);
297 * @return the zipCode
299 Integer getContactZipCode ();
304 * @param zipCode the zipCode to set
306 void setContactZipCode (final Integer zipCode);
309 * Checks whether the contact is user's own data
313 Boolean isOwnContact ();
316 * Check if contacts are same or throw an exception
318 * @param object Other possible contact class
320 * @return Whether both contacts are same
323 boolean equals (final Object object);