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.Calendar;
21 import java.util.Date;
22 import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
23 import org.mxchange.jcountry.model.data.Country;
24 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
25 import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
26 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
29 * A general contact POJI
31 * @author Roland Häder<roland@mxchange.org>
33 public interface Contact extends Serializable {
38 * @return the birthday
40 Date getContactBirthday ();
45 * @param birthday the birthday to set
47 void setContactBirthday (final Date birthday);
50 * Getter for mobile number
52 * @return Mobile number
54 DialableMobileNumber getContactMobileNumber ();
57 * Setter for mobile number
59 * @param mobileNumber Mobile number
61 void setContactMobileNumber (final DialableMobileNumber mobileNumber);
68 String getContactCity ();
73 * @param city the city to set
75 void setContactCity (final String city);
82 String getContactComment ();
87 * @param comment the comment to set
89 void setContactComment (final String comment);
94 * @return the contactId
101 * @param id the contactId to set
103 void setContactId (final Long id);
108 * @return the countryCode
110 Country getContactCountry ();
115 * @param contactCountry the countryCode to set
117 void setContactCountry (final Country contactCountry);
120 * Getter for "created" timestamp
122 * @return "created" timestamp
124 Calendar getContactCreated ();
127 * Setter for "created" timestamp
129 * @param created "created" timestamp
131 void setContactCreated (final Calendar created);
136 * @return the emailAddress
138 String getContactEmailAddress ();
143 * @param emailAddress the emailAddress to set
145 void setContactEmailAddress (final String emailAddress);
150 * @return the familyName
152 String getContactFamilyName ();
157 * @param familyName the familyName to set
159 void setContactFamilyName (final String familyName);
164 * @return the faxNumber
166 DialableFaxNumber getContactFaxNumber ();
171 * @param faxNumber the faxNumber to set
173 void setContactFaxNumber (final DialableFaxNumber faxNumber);
178 * @return the first name
180 String getContactFirstName ();
185 * @param firstName the first name to set
187 void setContactFirstName (final String firstName);
190 * Getter for personal title
192 * @return Personal title
194 PersonalTitle getContactPersonalTitle ();
197 * Setter for personal title
199 * @param personalTitle Personal title
201 void setContactPersonalTitle (final PersonalTitle personalTitle);
206 * @return the houseNumber
208 Short getContactHouseNumber ();
213 * @param houseNumber the houseNumber to set
215 void setContactHouseNumber (final Short houseNumber);
218 * Getter for house number extension, example: 123a 'a' is then the
219 * extension and 123 is the house number.
221 * @return House number extension
223 String getContactHouseNumberExtension ();
226 * Setter for house number extension
228 * @param contactHouseNumberExtension House number extension
230 void setContactHouseNumberExtension (final String contactHouseNumberExtension);
233 * Setter for own contact
235 * @param ownContact Own contact
237 void setContactOwnContact (final Boolean ownContact);
240 * Getter for phone number
242 * @return Phone number
244 DialableLandLineNumber getContactLandLineNumber ();
247 * Setter for phone number
249 * @param phoneNumber Phone number
251 void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
258 String getContactStreet ();
263 * @param street the street to set
265 void setContactStreet (final String street);
268 * Getter for contact's title
270 * @return Contact's title
272 String getContactTitle ();
275 * Setter for contact's title
277 * @param contactTitle Contact's title
279 void setContactTitle (final String contactTitle);
282 * Getter for "updated" timestamp
284 * @return "updated" timestamp
286 Calendar getContactUpdated ();
289 * Getter for "updated" timestamp
291 * @param updated "updated" timestamp
293 void setContactUpdated (final Calendar updated);
298 * @return the zipCode
300 Integer getContactZipCode ();
305 * @param zipCode the zipCode to set
307 void setContactZipCode (final Integer zipCode);
310 * Checks whether the contact is user's own data
314 Boolean isOwnContact ();
317 * Check if contacts are same or throw an exception
319 * @param object Other possible contact class
321 * @return Whether both contacts are same
324 boolean equals (final Object object);