]> git.mxchange.org Git - jcore.git/blob - src/org/mxchange/jcore/contact/Contact.java
Changed to SortedSet to keep ordering
[jcore.git] / src / org / mxchange / jcore / contact / Contact.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jcore.contact;
18
19 import java.lang.reflect.Field;
20 import java.lang.reflect.InvocationTargetException;
21 import java.util.Iterator;
22 import java.util.Map;
23 import org.mxchange.jcore.client.Client;
24 import org.mxchange.jcore.database.storage.Storable;
25
26 /**
27  * A general contact interface
28  *
29  * @author Roland Haeder
30  */
31 public interface Contact extends Storable, Comparable<Contact> {
32         /**
33          * Returns an iterator of all values from this object
34          *
35          * @return An iterator
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?
39          */
40         public Iterator<Map.Entry<Field, Object>> iterator ()throws NoSuchMethodException, IllegalAccessException, InvocationTargetException;
41
42         /**
43          * Some "getter" for translated gender of the contact
44          *
45          * @return Translated / human-readable gender
46          */
47         public String getTranslatedGender ();
48
49         /**
50          * Id number
51          * @return the contactId
52          */
53         public Long getContactId ();
54
55         /**
56          * Id number
57          * @param contactId the contactId to set
58          */
59         public void setContactId (final Long contactId);
60
61         /**
62          * Gender of the contact
63          *
64          * @return the gender
65          */
66         public Gender getGender ();
67
68         /**
69          * Gender of the contact
70          *
71          * @param gender the gender to set
72          */
73         public void setGender (final Gender gender);
74
75         /**
76          * First name
77          *
78          * @return the first name
79          */
80         public String getFirstName ();
81
82         /**
83          * First name
84          *
85          * @param firstName the first name to set
86          */
87         public void setFirstName (final String firstName);
88
89         /**
90          * Family name
91          *
92          * @return the familyName
93          */
94         public String getFamilyName ();
95
96         /**
97          * Family name
98          *
99          * @param familyName the familyName to set
100          */
101         public void setFamilyName (final String familyName);
102
103         /**
104          * Companyname
105          *
106          * @return the companyName
107          */
108         public String getCompanyName ();
109
110         /**
111          * Companyname
112          *
113          * @param companyName the companyName to set
114          */
115         public void setCompanyName (final String companyName);
116
117         /**
118          * Street
119          *
120          * @return the street
121          */
122         public String getStreet ();
123
124         /**
125          * Street
126          *
127          * @param street the street to set
128          */
129         public void setStreet (final String street);
130
131         /**
132          * House number
133          *
134          * @return the houseNumber
135          */
136         public Long getHouseNumber ();
137
138         /**
139          * House number
140          *
141          * @param houseNumber the houseNumber to set
142          */
143         public void setHouseNumber (final Long houseNumber);
144
145         /**
146          * ZIP code
147          *
148          * @return the zipCode
149          */
150         public Long getZipCode ();
151
152         /**
153          * ZIP code
154          *
155          * @param zipCode the zipCode to set
156          */
157         public void setZipCode (final Long zipCode);
158
159         /**
160          * City
161          *
162          * @return the city
163          */
164         public String getCity ();
165
166         /**
167          * City
168          *
169          * @param city the city to set
170          */
171         public void setCity (final String city);
172
173         /**
174          * Country code
175          *
176          * @return the countryCode
177          */
178         public String getCountryCode ();
179
180         /**
181          * Country code
182          *
183          * @param countryCode the countryCode to set
184          */
185         public void setCountryCode (final String countryCode);
186
187         /**
188          * Email address
189          *
190          * @return the emailAddress
191          */
192         public String getEmailAddress ();
193
194         /**
195          * Email address
196          *
197          * @param emailAddress the emailAddress to set
198          */
199         public void setEmailAddress (final String emailAddress);
200
201         /**
202          * Phone number
203          *
204          * @return the phoneNumber
205          */
206         public String getPhoneNumber ();
207
208         /**
209          * Phone number
210          *
211          * @param phoneNumber the phoneNumber to set
212          */
213         public void setPhoneNumber (final String phoneNumber);
214
215         /**
216          * Fax number
217          *
218          * @return the faxNumber
219          */
220         public String getFaxNumber ();
221
222         /**
223          * Fax number
224          *
225          * @param faxNumber the faxNumber to set
226          */
227         public void setFaxNumber (final String faxNumber);
228
229         /**
230          * Cellphone number
231          *
232          * @return the cellphoneNumber
233          */
234         public String getCellphoneNumber ();
235
236         /**
237          * Cellphone number
238          *
239          * @param cellphoneNumber the cellphoneNumber to set
240          */
241         public void setCellphoneNumber (final String cellphoneNumber);
242
243         /**
244          * Birth day
245          *
246          * @return the birthday
247          */
248         public String getBirthday ();
249
250         /**
251          * Birth day
252          *
253          * @param birthday the birthday to set
254          */
255         public void setBirthday (final String birthday);
256
257         /**
258          * Comments
259          *
260          * @return the comment
261          */
262         public String getComment ();
263
264         /**
265          * Comments
266          *
267          * @param comment the comment to set
268          */
269         public void setComment (final String comment);
270
271         /**
272          * Checks whether the contact is user's own data
273          *
274          * @return Own data?
275          */
276         public boolean isOwnContact ();
277
278         /**
279          * Shows the contact to the user
280          *
281          * @param client Client instance to call back
282          */
283         public void show (final Client client);
284
285         /**
286          * Compare method
287          * @param contact Contact to compare to
288          * @return Comparison value
289          */
290         @Override
291         public int compareTo (final Contact contact);
292 }