]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/gender/PizzaGenderWebApplicationBean.java
Updated copyright year
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / gender / PizzaGenderWebApplicationBean.java
index 6b4f9283a8922e3089883e5ff62d492e5eb86668..f4fa0dbfb276c41522534d74203950b2a45b12a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016, 2017 Roland Häder
+ * Copyright (C) 2016 - 2024 Free Software Foundation
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as
 */
 package org.mxchange.pizzaapplication.beans.gender;
 
+import java.util.Arrays;
 import java.util.List;
-import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
-import org.mxchange.jcontacts.contact.gender.Gender;
-import org.mxchange.jcontacts.contact.gender.GenderUtils;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.jcontacts.model.contact.title.PersonalTitle;
+import org.mxchange.pizzaapplication.beans.BasePizzaBean;
 
 /**
- * A gender bean (controller)
+ * A gender and title bean
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
 @Named ("genderController")
 @ApplicationScoped
-public class PizzaGenderWebApplicationBean extends BasePizzaController implements PizzaGenderWebApplicationController {
+public class PizzaGenderWebApplicationBean extends BasePizzaBean implements PizzaGenderWebApplicationController {
 
        /**
         * Serial number
@@ -47,25 +46,15 @@ public class PizzaGenderWebApplicationBean extends BasePizzaController implement
        }
 
        @Override
-       public Gender[] getAllGenders () {
+       public PersonalTitle[] getAllGenders () {
                // Return it
-               return Gender.values();
+               return PersonalTitle.values();
        }
 
        @Override
-       public List<Gender> getSelectableGenders () {
-               // Init array
-               List<Gender> genders = GenderUtils.selectableGenders();
-
+       public List<PersonalTitle> getSelectableGenders () {
                // Return it
-               return genders;
-       }
-
-       /**
-        * Post-construction method
-        */
-       @PostConstruct
-       public void init () {
+               return Arrays.asList(PersonalTitle.values());
        }
 
 }