2 * Copyright (C) 2015 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.jcore.contact;
19 import java.lang.reflect.Field;
20 import java.lang.reflect.InvocationTargetException;
21 import java.util.Iterator;
23 import org.mxchange.jcore.client.Client;
24 import org.mxchange.jcore.database.storage.Storeable;
27 * A general contact interface
29 * @author Roland Haeder
31 public interface Contact extends Storeable {
33 * Returns an iterator of all values from this object
36 * @throws java.lang.NoSuchMethodException If the invoked method was not found
37 * @throws java.lang.IllegalAccessException If the method cannot be accessed
38 * @throws java.lang.reflect.InvocationTargetException Any other problems?
40 public Iterator<Map.Entry<Field, Object>> iterator ()throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
43 * Some "getter" for translated gender of the contact
45 * @return Translated / human-readable gender
47 public String getTranslatedGender ();
50 * Gender of the contact
54 public Gender getGender ();
57 * Gender of the contact
59 * @param gender the gender to set
61 public void setGender (final Gender gender);
68 public String getSurname ();
73 * @param surname the surname to set
75 public void setSurname (final String surname);
80 * @return the familyName
82 public String getFamilyName ();
87 * @param familyName the familyName to set
89 public void setFamilyName (final String familyName);
94 * @return the companyName
96 public String getCompanyName ();
101 * @param companyName the companyName to set
103 public void setCompanyName (final String companyName);
110 public String getStreet ();
115 * @param street the street to set
117 public void setStreet (final String street);
122 * @return the houseNumber
124 public Long getHouseNumber ();
129 * @param houseNumber the houseNumber to set
131 public void setHouseNumber (final Long houseNumber);
136 * @return the zipCode
138 public Long getZipCode ();
143 * @param zipCode the zipCode to set
145 public void setZipCode (final Long zipCode);
152 public String getCity ();
157 * @param city the city to set
159 public void setCity (final String city);
164 * @return the countryCode
166 public String getCountryCode ();
171 * @param countryCode the countryCode to set
173 public void setCountryCode (final String countryCode);
178 * @return the emailAddress
180 public String getEmailAddress ();
185 * @param emailAddress the emailAddress to set
187 public void setEmailAddress (final String emailAddress);
192 * @return the phoneNumber
194 public String getPhoneNumber ();
199 * @param phoneNumber the phoneNumber to set
201 public void setPhoneNumber (final String phoneNumber);
206 * @return the faxNumber
208 public String getFaxNumber ();
213 * @param faxNumber the faxNumber to set
215 public void setFaxNumber (final String faxNumber);
220 * @return the cellphoneNumber
222 public String getCellphoneNumber ();
227 * @param cellphoneNumber the cellphoneNumber to set
229 public void setCellphoneNumber (final String cellphoneNumber);
234 * @return the birthday
236 public String getBirthday ();
241 * @param birthday the birthday to set
243 public void setBirthday (final String birthday);
248 * @return the comment
250 public String getComment ();
255 * @param comment the comment to set
257 public void setComment (final String comment);
260 * Checks whether the contact is user's own data
264 public boolean isOwnContact ();
267 * Shows the contact to the user
269 * @param client Client instance to call back
271 public void show (final Client client);