2 * Copyright (C) 2016 Roland Haeder
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.contact;
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;
29 * A general contact POJI
31 * @author Roland Haeder<roland@mxchange.org>
33 public interface Contact extends Serializable {
36 * Copies all attributes from other contact object to this
38 * @param contact Source instance
40 void copyAll (final Contact contact);
45 * @return the birthday
47 Date getContactBirthday ();
52 * @param birthday the birthday to set
54 void setContactBirthday (final Date birthday);
57 * Getter for cellphone number
59 * @return Cellphone number
61 DialableCellphoneNumber getContactCellphoneNumber ();
64 * Setter for cellphone number
66 * @param cellphoneNumber Cellphone number
68 void setContactCellphoneNumber (final DialableCellphoneNumber cellphoneNumber);
75 String getContactCity ();
80 * @param city the city to set
82 void setContactCity (final String city);
89 String getContactComment ();
94 * @param comment the comment to set
96 void setContactComment (final String comment);
101 * @return the contactId
103 Long getContactId ();
108 * @param id the contactId to set
110 void setContactId (final Long id);
115 * @return the countryCode
117 Country getContactCountry ();
122 * @param contactCountry the countryCode to set
124 void setContactCountry (final Country contactCountry);
127 * Getter for "created" timestamp
129 * @return "created" timestamp
131 Calendar getContactCreated ();
134 * Setter for "created" timestamp
136 * @param created "created" timestamp
138 void setContactCreated (final Calendar created);
143 * @return the emailAddress
145 String getContactEmailAddress ();
150 * @param emailAddress the emailAddress to set
152 void setContactEmailAddress (final String emailAddress);
157 * @return the familyName
159 String getContactFamilyName ();
164 * @param familyName the familyName to set
166 void setContactFamilyName (final String familyName);
171 * @return the faxNumber
173 DialableFaxNumber getContactFaxNumber ();
178 * @param faxNumber the faxNumber to set
180 void setContactFaxNumber (final DialableFaxNumber faxNumber);
185 * @return the first name
187 String getContactFirstName ();
192 * @param firstName the first name to set
194 void setContactFirstName (final String firstName);
197 * Gender of the contact
201 Gender getContactGender ();
204 * Gender of the contact
206 * @param gender the gender to set
208 void setContactGender (final Gender gender);
211 * Getter for house number extension, example: 123a 'a' is then the
212 * extension and 123 is the house number.
214 * @return House number extension
216 String getContactHouseNumberExtension ();
219 * Setter for house number extension
221 * @param contactHouseNumberExtension House number extension
223 void setContactHouseNumberExtension (final String contactHouseNumberExtension);
228 * @return the houseNumber
230 Short getContactHouseNumber ();
235 * @param houseNumber the houseNumber to set
237 void setContactHouseNumber (final Short houseNumber);
240 * Setter for own contact
242 * @param ownContact Own contact
244 void setContactOwnContact (final Boolean ownContact);
247 * Getter for phone number
249 * @return Phone number
251 DialableLandLineNumber getContactLandLineNumber ();
254 * Setter for phone number
256 * @param phoneNumber Phone number
258 void setContactLandLineNumber (final DialableLandLineNumber phoneNumber);
265 String getContactStreet ();
270 * @param street the street to set
272 void setContactStreet (final String street);
275 * Getter for contact's title
277 * @return Contact's title
279 String getContactTitle ();
282 * Setter for contact's title
284 * @param contactTitle Contact's title
286 void setContactTitle (final String contactTitle);
289 * Getter for "updated" timestamp
291 * @return "updated" timestamp
293 Calendar getContactUpdated ();
296 * Getter for "updated" timestamp
298 * @param updated "updated" timestamp
300 void setContactUpdated (final Calendar updated);
305 * @return the zipCode
307 Integer getContactZipCode ();
312 * @param zipCode the zipCode to set
314 void setContactZipCode (final Integer zipCode);
317 * Checks whether the contact is user's own data
321 Boolean isOwnContact ();
324 * Check if contacts are same or throw an exception
326 * @param object Other possible contact class
328 * @return Whether both contacts are same
331 boolean equals (final Object object);