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.pizzaapplication.beans.customer;
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;
28 * A customer bean which hides the customer instance
30 * @author Roland Haeder
34 public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements CustomerWebBean {
38 private static final long serialVersionUID = 542145347916L;
43 private Contact contact;
48 public PizzaServiceCustomerWebBean () {
50 Contact customer = new ShopCustomer();
53 this.setContact(customer);
57 public String getBirthday () {
58 // Deligate to "hidden" object
59 return this.getContact().getBirthday();
63 public void setBirthday (final String birthday) {
64 // Deligate to "hidden" object
65 this.getContact().setBirthday(birthday);
69 public String getCellphoneNumber () {
70 // Deligate to "hidden" object
71 return this.getContact().getCellphoneNumber();
75 public void setCellphoneNumber (final String cellphoneNumber) {
76 // Deligate to "hidden" object
77 this.getContact().setCellphoneNumber(cellphoneNumber);
81 public String getCity () {
82 // Deligate to "hidden" object
83 return this.getContact().getCity();
87 public void setCity (final String city) {
88 // Deligate to "hidden" object
89 this.getContact().setCity(city);
93 public String getComment () {
94 // Deligate to "hidden" object
95 return this.getContact().getComment();
99 public void setComment (final String comment) {
100 // Deligate to "hidden" object
101 this.getContact().setComment(comment);
105 public String getCompanyName () {
106 // Deligate to "hidden" object
107 return this.getContact().getCompanyName();
111 public void setCompanyName (final String companyName) {
112 // Deligate to "hidden" object
113 this.getContact().setCompanyName(companyName);
117 public String getCountryCode () {
118 // Deligate to "hidden" object
119 return this.getContact().getCountryCode();
123 public void setCountryCode (final String countryCode) {
124 // Deligate to "hidden" object
125 this.getContact().setCountryCode(countryCode);
129 public String getEmailAddress () {
130 // Deligate to "hidden" object
131 return this.getContact().getEmailAddress();
135 public void setEmailAddress (final String emailAddress) {
136 // Deligate to "hidden" object
137 this.getContact().setEmailAddress(emailAddress);
141 public String getFamilyName () {
143 //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!");
145 // Deligate to "hidden" object
146 return this.getContact().getFamilyName();
150 public void setFamilyName (final String familyName) {
152 //* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName));
154 // Deligate to "hidden" object
155 this.getContact().setFamilyName(familyName);
159 public String getFaxNumber () {
160 // Deligate to "hidden" object
161 return this.getContact().getFaxNumber();
165 public void setFaxNumber (final String faxNumber) {
166 // Deligate to "hidden" object
167 this.getContact().setFaxNumber(faxNumber);
171 public Gender getGender () {
172 // Deligate to "hidden" object
173 return this.getContact().getGender();
177 public void setGender (final Gender gender) {
178 // Deligate to "hidden" object
179 this.getContact().setGender(gender);
183 public Long getHouseNumber () {
184 // Deligate to "hidden" object
185 return this.getContact().getHouseNumber();
189 public void setHouseNumber (final Long houseNumber) {
190 // Deligate to "hidden" object
191 this.getContact().setHouseNumber(houseNumber);
195 public String getPhoneNumber () {
196 // Deligate to "hidden" object
197 return this.getContact().getPhoneNumber();
201 public void setPhoneNumber (final String phoneNumber) {
202 // Deligate to "hidden" object
203 this.getContact().setPhoneNumber(phoneNumber);
207 public String getStreet () {
208 // Deligate to "hidden" object
209 return this.getContact().getStreet();
213 public void setStreet (final String street) {
214 // Deligate to "hidden" object
215 this.getContact().setStreet(street);
219 public String getFirstName () {
220 // Deligate to "hidden" object
221 return this.getContact().getFirstName();
225 public void setFirstName (final String firstName) {
226 // Deligate to "hidden" object
227 this.getContact().setFirstName(firstName);
231 public String getTranslatedGender () {
232 // Deligate to "hidden" object
233 return this.getContact().getTranslatedGender();
237 public Long getZipCode () {
238 // Deligate to "hidden" object
239 return this.getContact().getZipCode();
243 public void setZipCode (final Long zipCode) {
244 // Deligate to "hidden" object
245 this.getContact().setZipCode(zipCode);
249 public boolean isOwnContact () {
250 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
254 public void show (final Client client) {
255 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
259 * Setter for Contact instance
260 * @param contact Contact instance to set
262 private void setContact (final Contact contact) {
263 this.contact = contact;
267 * Getter for Contact instance
268 * @return Contact instance
270 private Contact getContact () {