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 java.lang.reflect.Field;
20 import java.lang.reflect.InvocationTargetException;
21 import java.util.Iterator;
23 import javax.enterprise.context.SessionScoped;
24 import javax.inject.Named;
25 import org.mxchange.jcore.client.Client;
26 import org.mxchange.jcore.contact.Contact;
27 import org.mxchange.jcore.contact.gender.Gender;
28 import org.mxchange.jshop.beans.BaseFrameworkBean;
29 import org.mxchange.pizzaapplication.model.customer.PizzaServiceCustomer;
32 * A customer bean which hides the customer instance
34 * @author Roland Haeder
38 public class PizzaServiceCustomerBean extends BaseFrameworkBean implements CustomerBean {
42 private static final long serialVersionUID = 542145347916L;
47 private Contact contact;
52 public PizzaServiceCustomerBean () {
54 Contact customer = new PizzaServiceCustomer();
57 this.setContact(customer);
61 public String getBirthday () {
62 // Deligate to "hidden" object
63 return this.getContact().getBirthday();
67 public void setBirthday (final String birthday) {
68 // Deligate to "hidden" object
69 this.getContact().setBirthday(birthday);
73 public String getCellphoneNumber () {
74 // Deligate to "hidden" object
75 return this.getContact().getCellphoneNumber();
79 public void setCellphoneNumber (final String cellphoneNumber) {
80 // Deligate to "hidden" object
81 this.getContact().setCellphoneNumber(cellphoneNumber);
85 public String getCity () {
86 // Deligate to "hidden" object
87 return this.getContact().getCity();
91 public void setCity (final String city) {
92 // Deligate to "hidden" object
93 this.getContact().setCity(city);
97 public String getComment () {
98 // Deligate to "hidden" object
99 return this.getContact().getComment();
103 public void setComment (final String comment) {
104 // Deligate to "hidden" object
105 this.getContact().setComment(comment);
109 public String getCompanyName () {
110 // Deligate to "hidden" object
111 return this.getContact().getCompanyName();
115 public void setCompanyName (final String companyName) {
116 // Deligate to "hidden" object
117 this.getContact().setCompanyName(companyName);
121 public String getCountryCode () {
122 // Deligate to "hidden" object
123 return this.getContact().getCountryCode();
127 public void setCountryCode (final String countryCode) {
128 // Deligate to "hidden" object
129 this.getContact().setCountryCode(countryCode);
133 public String getEmailAddress () {
134 // Deligate to "hidden" object
135 return this.getContact().getEmailAddress();
139 public void setEmailAddress (final String emailAddress) {
140 // Deligate to "hidden" object
141 this.getContact().setEmailAddress(emailAddress);
145 public String getFamilyName () {
147 //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!");
149 // Deligate to "hidden" object
150 return this.getContact().getFamilyName();
154 public void setFamilyName (final String familyName) {
156 //* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName));
158 // Deligate to "hidden" object
159 this.getContact().setFamilyName(familyName);
163 public String getFaxNumber () {
164 // Deligate to "hidden" object
165 return this.getContact().getFaxNumber();
169 public void setFaxNumber (final String faxNumber) {
170 // Deligate to "hidden" object
171 this.getContact().setFaxNumber(faxNumber);
175 public Gender getGender () {
176 // Deligate to "hidden" object
177 return this.getContact().getGender();
181 public void setGender (final Gender gender) {
182 // Deligate to "hidden" object
183 this.getContact().setGender(gender);
187 public Long getHouseNumber () {
188 // Deligate to "hidden" object
189 return this.getContact().getHouseNumber();
193 public void setHouseNumber (final Long houseNumber) {
194 // Deligate to "hidden" object
195 this.getContact().setHouseNumber(houseNumber);
199 public String getPhoneNumber () {
200 // Deligate to "hidden" object
201 return this.getContact().getPhoneNumber();
205 public void setPhoneNumber (final String phoneNumber) {
206 // Deligate to "hidden" object
207 this.getContact().setPhoneNumber(phoneNumber);
211 public String getStreet () {
212 // Deligate to "hidden" object
213 return this.getContact().getStreet();
217 public void setStreet (final String street) {
218 // Deligate to "hidden" object
219 this.getContact().setStreet(street);
223 public String getFirstName () {
224 // Deligate to "hidden" object
225 return this.getContact().getFirstName();
229 public void setFirstName (final String firstName) {
230 // Deligate to "hidden" object
231 this.getContact().setFirstName(firstName);
235 public String getTranslatedGender () {
236 // Deligate to "hidden" object
237 return this.getContact().getTranslatedGender();
241 public Long getZipCode () {
242 // Deligate to "hidden" object
243 return this.getContact().getZipCode();
247 public void setZipCode (final Long zipCode) {
248 // Deligate to "hidden" object
249 this.getContact().setZipCode(zipCode);
253 public boolean isOwnContact () {
254 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
258 public void show (final Client client) {
259 throw new UnsupportedOperationException("Not supported yet."); //NOI18N
263 * Setter for Contact instance
264 * @param contact Contact instance to set
266 private void setContact (final Contact contact) {
267 this.contact = contact;
271 * Getter for Contact instance
272 * @return Contact instance
274 private Contact getContact () {