/*
- * Copyright (C) 2016 Roland Haeder
+ * 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.enterprise.context.ApplicationScoped;
import javax.inject.Named;
-import org.mxchange.jcontacts.contact.gender.Gender;
-import org.mxchange.jcontacts.contact.gender.GenderUtils;
+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 Haeder<roland@mxchange.org>
+ * @author Roland Hรคder<roland@mxchange.org>
*/
@Named ("genderController")
@ApplicationScoped
-public class PizzaGenderWebApplicationBean implements PizzaGenderWebApplicationController {
+public class PizzaGenderWebApplicationBean extends BasePizzaBean implements PizzaGenderWebApplicationController {
/**
* Serial number
* Default constructor
*/
public PizzaGenderWebApplicationBean () {
+ // Call super constructor
+ super();
}
@Override
- public Gender[] getAllGenders () {
+ public PersonalTitle[] getAllGenders () {
// Return it
- return Gender.values();
+ return PersonalTitle.values();
}
@Override
- public List<Gender> getSelectableGenders () {
- // Init array
- // TODO Call EJB here?
- List<Gender> genders = GenderUtils.selectableGenders();
-
+ public List<PersonalTitle> getSelectableGenders () {
// Return it
- return genders;
+ return Arrays.asList(PersonalTitle.values());
}
+
}