]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Renamed methods and instance and used Customer interface, so the bean doesn't "see...
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 18:31:38 +0000 (20:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 18:31:38 +0000 (20:31 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/beans/customer/CustomerWebBean.java
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaServiceCustomerWebBean.java

index 01a603b393e13be63a494204bb6429f9912c35c9..13e9c27ac46393184202c9f063df49d3b7751afa 100644 (file)
@@ -249,11 +249,4 @@ public interface CustomerWebBean extends FrameworkBean {
         * @return Own data?
         */
        public boolean isOwnContact ();
-
-       /**
-        * Shows the contact to the user
-        *
-        * @param client Client instance to call back
-        */
-       public void show (final Client client);
 }
index 116ef539742763a332c455bd49041887f02806ea..c7f873d3dabf51662c640ee44a7294d2728be701 100644 (file)
@@ -18,10 +18,9 @@ package org.mxchange.pizzaapplication.beans.customer;
 
 import javax.enterprise.context.SessionScoped;
 import javax.inject.Named;
-import org.mxchange.jcore.client.Client;
-import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.gender.Gender;
 import org.mxchange.jshop.beans.BaseFrameworkBean;
+import org.mxchange.jshop.model.customer.Customer;
 import org.mxchange.jshop.model.customer.ShopCustomer;
 
 /**
@@ -38,103 +37,103 @@ public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements Cu
        private static final long serialVersionUID = 542145347916L;
 
        /**
-        * Contact instance
+        * Customer instance
         */
-       private Contact contact;
+       private Customer customer;
 
        /**
         * Default constructor
         */
        public PizzaServiceCustomerWebBean () {
                // Instance customer
-               Contact customer = new ShopCustomer();
+               Customer customer = new ShopCustomer();
 
                // And set it here
-               this.setContact(customer);
+               this.setCustomer(customer);
        }
 
        @Override
        public String getBirthday () {
                // Deligate to "hidden" object
-               return this.getContact().getBirthday();
+               return this.getCustomer().getBirthday();
        }
 
        @Override
        public void setBirthday (final String birthday) {
                // Deligate to "hidden" object
-               this.getContact().setBirthday(birthday);
+               this.getCustomer().setBirthday(birthday);
        }
 
        @Override
        public String getCellphoneNumber () {
                // Deligate to "hidden" object
-               return this.getContact().getCellphoneNumber();
+               return this.getCustomer().getCellphoneNumber();
        }
 
        @Override
        public void setCellphoneNumber (final String cellphoneNumber) {
                // Deligate to "hidden" object
-               this.getContact().setCellphoneNumber(cellphoneNumber);
+               this.getCustomer().setCellphoneNumber(cellphoneNumber);
        }
 
        @Override
        public String getCity () {
                // Deligate to "hidden" object
-               return this.getContact().getCity();
+               return this.getCustomer().getCity();
        }
 
        @Override
        public void setCity (final String city) {
                // Deligate to "hidden" object
-               this.getContact().setCity(city);
+               this.getCustomer().setCity(city);
        }
 
        @Override
        public String getComment () {
                // Deligate to "hidden" object
-               return this.getContact().getComment();
+               return this.getCustomer().getComment();
        }
 
        @Override
        public void setComment (final String comment) {
                // Deligate to "hidden" object
-               this.getContact().setComment(comment);
+               this.getCustomer().setComment(comment);
        }
 
        @Override
        public String getCompanyName () {
                // Deligate to "hidden" object
-               return this.getContact().getCompanyName();
+               return this.getCustomer().getCompanyName();
        }
 
        @Override
        public void setCompanyName (final String companyName) {
                // Deligate to "hidden" object
-               this.getContact().setCompanyName(companyName);
+               this.getCustomer().setCompanyName(companyName);
        }
 
        @Override
        public String getCountryCode () {
                // Deligate to "hidden" object
-               return this.getContact().getCountryCode();
+               return this.getCustomer().getCountryCode();
        }
 
        @Override
        public void setCountryCode (final String countryCode) {
                // Deligate to "hidden" object
-               this.getContact().setCountryCode(countryCode);
+               this.getCustomer().setCountryCode(countryCode);
        }
 
        @Override
        public String getEmailAddress () {
                // Deligate to "hidden" object
-               return this.getContact().getEmailAddress();
+               return this.getCustomer().getEmailAddress();
        }
 
        @Override
        public void setEmailAddress (final String emailAddress) {
                // Deligate to "hidden" object
-               this.getContact().setEmailAddress(emailAddress);
+               this.getCustomer().setEmailAddress(emailAddress);
        }
 
        @Override
@@ -143,7 +142,7 @@ public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements Cu
                //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!");
 
                // Deligate to "hidden" object
-               return this.getContact().getFamilyName();
+               return this.getCustomer().getFamilyName();
        }
 
        @Override
@@ -152,97 +151,97 @@ public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements Cu
                //* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName));
 
                // Deligate to "hidden" object
-               this.getContact().setFamilyName(familyName);
+               this.getCustomer().setFamilyName(familyName);
        }
 
        @Override
        public String getFaxNumber () {
                // Deligate to "hidden" object
-               return this.getContact().getFaxNumber();
+               return this.getCustomer().getFaxNumber();
        }
 
        @Override
        public void setFaxNumber (final String faxNumber) {
                // Deligate to "hidden" object
-               this.getContact().setFaxNumber(faxNumber);
+               this.getCustomer().setFaxNumber(faxNumber);
        }
 
        @Override
        public Gender getGender () {
                // Deligate to "hidden" object
-               return this.getContact().getGender();
+               return this.getCustomer().getGender();
        }
 
        @Override
        public void setGender (final Gender gender) {
                // Deligate to "hidden" object
-               this.getContact().setGender(gender);
+               this.getCustomer().setGender(gender);
        }
 
        @Override
        public Long getHouseNumber () {
                // Deligate to "hidden" object
-               return this.getContact().getHouseNumber();
+               return this.getCustomer().getHouseNumber();
        }
 
        @Override
        public void setHouseNumber (final Long houseNumber) {
                // Deligate to "hidden" object
-               this.getContact().setHouseNumber(houseNumber);
+               this.getCustomer().setHouseNumber(houseNumber);
        }
 
        @Override
        public String getPhoneNumber () {
                // Deligate to "hidden" object
-               return this.getContact().getPhoneNumber();
+               return this.getCustomer().getPhoneNumber();
        }
 
        @Override
        public void setPhoneNumber (final String phoneNumber) {
                // Deligate to "hidden" object
-               this.getContact().setPhoneNumber(phoneNumber);
+               this.getCustomer().setPhoneNumber(phoneNumber);
        }
 
        @Override
        public String getStreet () {
                // Deligate to "hidden" object
-               return this.getContact().getStreet();
+               return this.getCustomer().getStreet();
        }
 
        @Override
        public void setStreet (final String street) {
                // Deligate to "hidden" object
-               this.getContact().setStreet(street);
+               this.getCustomer().setStreet(street);
        }
 
        @Override
        public String getFirstName () {
                // Deligate to "hidden" object
-               return this.getContact().getFirstName();
+               return this.getCustomer().getFirstName();
        }
 
        @Override
        public void setFirstName (final String firstName) {
                // Deligate to "hidden" object
-               this.getContact().setFirstName(firstName);
+               this.getCustomer().setFirstName(firstName);
        }
 
        @Override
        public String getTranslatedGender () {
                // Deligate to "hidden" object
-               return this.getContact().getTranslatedGender();
+               return this.getCustomer().getTranslatedGender();
        }
 
        @Override
        public Long getZipCode () {
                // Deligate to "hidden" object
-               return this.getContact().getZipCode();
+               return this.getCustomer().getZipCode();
        }
 
        @Override
        public void setZipCode (final Long zipCode) {
                // Deligate to "hidden" object
-               this.getContact().setZipCode(zipCode);
+               this.getCustomer().setZipCode(zipCode);
        }
 
        @Override
@@ -250,24 +249,19 @@ public class PizzaServiceCustomerWebBean extends BaseFrameworkBean implements Cu
                throw new UnsupportedOperationException("Not supported yet."); //NOI18N
        }
 
-       @Override
-       public void show (final Client client) {
-               throw new UnsupportedOperationException("Not supported yet."); //NOI18N
-       }
-
        /**
-        * Setter for Contact instance
-        * @param contact Contact instance to set
+        * Setter for Customer instance
+        * @param customer Contact instance to set
         */
-       private void setContact (final Contact contact) {
-               this.contact = contact;
+       private void setCustomer (final Customer customer) {
+               this.customer = customer;
        }
 
        /**
-        * Getter for Contact instance
+        * Getter for Customer instance
         * @return Contact instance
         */
-       private Contact getContact () {
-               return this.contact;
+       private Customer getCustomer () {
+               return this.customer;
        }
 }