/*
- * 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
}
@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());
}
}