2 * Copyright (C) 2016, 2017 Roland Häder
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 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 getContactCreated ();
126 * Setter for "created" timestamp
128 * @param created "created" timestamp
130 void setContactCreated (final Date created);
135 * @return the emailAddress
137 String getContactEmailAddress ();
142 * @param emailAddress the emailAddress to set
144 void setContactEmailAddress (final String emailAddress);
149 * @return the familyName
151 String getContactFamilyName ();
156 * @param familyName the familyName to set
158 void setContactFamilyName (final String familyName);
163 * @return the faxNumber
165 DialableFaxNumber getContactFaxNumber ();
170 * @param faxNumber the faxNumber to set
172 void setContactFaxNumber (final DialableFaxNumber faxNumber);
177 * @return the first name
179 String getContactFirstName ();
184 * @param firstName the first name to set
186 void setContactFirstName (final String firstName);
189 * Getter for personal title
191 * @return Personal title
193 PersonalTitle getContactPersonalTitle ();
196 * Setter for personal title
198 * @param personalTitle Personal title
200 void setContactPersonalTitle (final PersonalTitle personalTitle);
205 * @return the houseNumber
207 Short getContactHouseNumber ();
212 * @param houseNumber the houseNumber to set
214 void setContactHouseNumber (final Short houseNumber);
217 * Getter for house number extension, example: 123a 'a' is then the
218 * extension and 123 is the house number.
220 * @return House number extension
222 String getContactHouseNumberExtension ();
225 * Setter for house number extension
227 * @param contactHouseNumberExtension House number extension
229 void setContactHouseNumberExtension (final String contactHouseNumberExtension);
232 * Setter for own contact
234 * @param ownContact Own contact
236 void setContactOwnContact (final Boolean ownContact);
239 * Getter for phone number
241 * @return Phone number
243 DialableLandLineNumber getContactLandLineNumber ();
246 * Setter for phone number
248 * @param phoneNumber Phone number
250 void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
257 String getContactStreet ();
262 * @param street the street to set
264 void setContactStreet (final String street);
267 * Getter for contact's title
269 * @return Contact's title
271 String getContactTitle ();
274 * Setter for contact's title
276 * @param contactTitle Contact's title
278 void setContactTitle (final String contactTitle);
281 * Getter for "updated" timestamp
283 * @return "updated" timestamp
285 Date getContactUpdated ();
288 * Getter for "updated" timestamp
290 * @param updated "updated" timestamp
292 void setContactUpdated (final Date updated);
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);