]> git.mxchange.org Git - pizzaservice-war.git/blob - src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java
Got rid of another empty class
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / customer / PizzaServiceCustomerWebBean.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 javax.enterprise.context.SessionScoped;
20 import javax.inject.Named;
21 import org.mxchange.jcore.client.Client;
22 import org.mxchange.jcore.contact.Contact;
23 import org.mxchange.jcore.contact.gender.Gender;
24 import org.mxchange.jshop.beans.BaseFrameworkBean;
25 import org.mxchange.jshop.model.customer.ShopCustomer;
26
27 /**
28  * A customer bean which hides the customer instance
29  *
30  * @author Roland Haeder
31  */
32 @Named("customer")
33 @SessionScoped
34 public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements CustomerWebBean {
35         /**
36          * Serial number
37          */
38         private static final long serialVersionUID = 542145347916L;
39
40         /**
41          * Contact instance
42          */
43         private Contact contact;
44
45         /**
46          * Default constructor
47          */
48         public PizzaServiceCustomerWebBean () {
49                 // Instance customer
50                 Contact customer = new ShopCustomer();
51
52                 // And set it here
53                 this.setContact(customer);
54         }
55
56         @Override
57         public String getBirthday () {
58                 // Deligate to "hidden" object
59                 return this.getContact().getBirthday();
60         }
61
62         @Override
63         public void setBirthday (final String birthday) {
64                 // Deligate to "hidden" object
65                 this.getContact().setBirthday(birthday);
66         }
67
68         @Override
69         public String getCellphoneNumber () {
70                 // Deligate to "hidden" object
71                 return this.getContact().getCellphoneNumber();
72         }
73
74         @Override
75         public void setCellphoneNumber (final String cellphoneNumber) {
76                 // Deligate to "hidden" object
77                 this.getContact().setCellphoneNumber(cellphoneNumber);
78         }
79
80         @Override
81         public String getCity () {
82                 // Deligate to "hidden" object
83                 return this.getContact().getCity();
84         }
85
86         @Override
87         public void setCity (final String city) {
88                 // Deligate to "hidden" object
89                 this.getContact().setCity(city);
90         }
91
92         @Override
93         public String getComment () {
94                 // Deligate to "hidden" object
95                 return this.getContact().getComment();
96         }
97
98         @Override
99         public void setComment (final String comment) {
100                 // Deligate to "hidden" object
101                 this.getContact().setComment(comment);
102         }
103
104         @Override
105         public String getCompanyName () {
106                 // Deligate to "hidden" object
107                 return this.getContact().getCompanyName();
108         }
109
110         @Override
111         public void setCompanyName (final String companyName) {
112                 // Deligate to "hidden" object
113                 this.getContact().setCompanyName(companyName);
114         }
115
116         @Override
117         public String getCountryCode () {
118                 // Deligate to "hidden" object
119                 return this.getContact().getCountryCode();
120         }
121
122         @Override
123         public void setCountryCode (final String countryCode) {
124                 // Deligate to "hidden" object
125                 this.getContact().setCountryCode(countryCode);
126         }
127
128         @Override
129         public String getEmailAddress () {
130                 // Deligate to "hidden" object
131                 return this.getContact().getEmailAddress();
132         }
133
134         @Override
135         public void setEmailAddress (final String emailAddress) {
136                 // Deligate to "hidden" object
137                 this.getContact().setEmailAddress(emailAddress);
138         }
139
140         @Override
141         public String getFamilyName () {
142                 // Trace call
143                 //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!");
144
145                 // Deligate to "hidden" object
146                 return this.getContact().getFamilyName();
147         }
148
149         @Override
150         public void setFamilyName (final String familyName) {
151                 // Trace call
152                 //* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName));
153
154                 // Deligate to "hidden" object
155                 this.getContact().setFamilyName(familyName);
156         }
157
158         @Override
159         public String getFaxNumber () {
160                 // Deligate to "hidden" object
161                 return this.getContact().getFaxNumber();
162         }
163
164         @Override
165         public void setFaxNumber (final String faxNumber) {
166                 // Deligate to "hidden" object
167                 this.getContact().setFaxNumber(faxNumber);
168         }
169
170         @Override
171         public Gender getGender () {
172                 // Deligate to "hidden" object
173                 return this.getContact().getGender();
174         }
175
176         @Override
177         public void setGender (final Gender gender) {
178                 // Deligate to "hidden" object
179                 this.getContact().setGender(gender);
180         }
181
182         @Override
183         public Long getHouseNumber () {
184                 // Deligate to "hidden" object
185                 return this.getContact().getHouseNumber();
186         }
187
188         @Override
189         public void setHouseNumber (final Long houseNumber) {
190                 // Deligate to "hidden" object
191                 this.getContact().setHouseNumber(houseNumber);
192         }
193
194         @Override
195         public String getPhoneNumber () {
196                 // Deligate to "hidden" object
197                 return this.getContact().getPhoneNumber();
198         }
199
200         @Override
201         public void setPhoneNumber (final String phoneNumber) {
202                 // Deligate to "hidden" object
203                 this.getContact().setPhoneNumber(phoneNumber);
204         }
205
206         @Override
207         public String getStreet () {
208                 // Deligate to "hidden" object
209                 return this.getContact().getStreet();
210         }
211
212         @Override
213         public void setStreet (final String street) {
214                 // Deligate to "hidden" object
215                 this.getContact().setStreet(street);
216         }
217
218         @Override
219         public String getFirstName () {
220                 // Deligate to "hidden" object
221                 return this.getContact().getFirstName();
222         }
223
224         @Override
225         public void setFirstName (final String firstName) {
226                 // Deligate to "hidden" object
227                 this.getContact().setFirstName(firstName);
228         }
229
230         @Override
231         public String getTranslatedGender () {
232                 // Deligate to "hidden" object
233                 return this.getContact().getTranslatedGender();
234         }
235
236         @Override
237         public Long getZipCode () {
238                 // Deligate to "hidden" object
239                 return this.getContact().getZipCode();
240         }
241
242         @Override
243         public void setZipCode (final Long zipCode) {
244                 // Deligate to "hidden" object
245                 this.getContact().setZipCode(zipCode);
246         }
247
248         @Override
249         public boolean isOwnContact () {
250                 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
251         }
252
253         @Override
254         public void show (final Client client) {
255                 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
256         }
257
258         /**
259          * Setter for Contact instance
260          * @param contact Contact instance to set
261          */
262         private void setContact (final Contact contact) {
263                 this.contact = contact;
264         }
265
266         /**
267          * Getter for Contact instance
268          * @return Contact instance
269          */
270         private Contact getContact () {
271                 return this.contact;
272         }
273 }