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