]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
renamed project to all-lowercase
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / contact / PizzaAdminContactWebRequestBean.java
index 492051b284fd38b6f5bd20f78bbf9c59614d9f36..19224194d37a5b6b457e56225d4d519fb8d6b7fa 100644 (file)
@@ -19,7 +19,6 @@ package org.mxchange.pizzaapplication.beans.contact;
 import java.text.MessageFormat;
 import java.util.Date;
 import java.util.Iterator;
-import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.RequestScoped;
 import javax.enterprise.event.Event;
@@ -48,6 +47,7 @@ import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController;
 
 /**
@@ -57,7 +57,7 @@ import org.mxchange.pizzaapplication.beans.helper.PizzaAdminWebRequestController
  */
 @Named ("adminContactController")
 @RequestScoped
-public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequestController {
+public class PizzaAdminContactWebRequestBean extends BasePizzaController implements PizzaAdminContactWebRequestController {
 
        /**
         * Serial number
@@ -229,16 +229,13 @@ public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequ
         * Default constructor
         */
        public PizzaAdminContactWebRequestBean () {
-               // Set gender to UNKNOWN
-               this.gender = Gender.UNKNOWN;
-
                // Try it
                try {
                        // Get initial context
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
+                       this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/pizzaservice-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
@@ -278,11 +275,6 @@ public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequ
                return "admin_list_contact"; //NOI18N
        }
 
-       @Override
-       public List<Contact> allContacts () {
-               return this.contactController.allContacts();
-       }
-
        @Override
        public void copyContactToController (final Contact contact) {
                // Log message
@@ -712,11 +704,6 @@ public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequ
                this.zipCode = zipCode;
        }
 
-       @Override
-       public boolean hasContacts () {
-               return (!this.allContacts().isEmpty());
-       }
-
        /**
         * Post-initialization of this class
         */
@@ -767,7 +754,7 @@ public class PizzaAdminContactWebRequestBean implements PizzaAdminContactWebRequ
                boolean IsFound = false;
 
                // Get iterator
-               Iterator<Contact> iterator = this.allContacts().iterator();
+               Iterator<Contact> iterator = this.contactController.allContacts().iterator();
 
                // Loop through all
                while (iterator.hasNext()) {