]> git.mxchange.org Git - jjobs-war.git/blobdiff - src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java
Confusion in controller name versus variable e.g. from selectItems
[jjobs-war.git] / src / java / org / mxchange / jjobs / beans / country / JobsCountryWebApplicationBean.java
index 93cd4fdc1afcb82b09d23de62cd45921db4ea6f8..f2f15c02ca776551ede273b3666851e296215b2c 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.jjobs.beans.country;
 
 import java.text.MessageFormat;
+import java.util.Collections;
 import java.util.List;
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
@@ -29,15 +30,16 @@ import javax.naming.NamingException;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
 import org.mxchange.jcountry.events.AdminAddedCountryEvent;
+import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
  * A country bean
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
-@Named ("country")
+@Named ("countryController")
 @ApplicationScoped
-public class JobsCountryWebApplicationBean implements JobsCountryWebApplicationController {
+public class JobsCountryWebApplicationBean extends BaseJobsController implements JobsCountryWebApplicationController {
 
        /**
         * Serial number
@@ -93,10 +95,14 @@ public class JobsCountryWebApplicationBean implements JobsCountryWebApplicationC
        }
 
        @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
        public List<Country> allCountries () {
                // Return "cached" version
-               return this.countryList;
+               return Collections.unmodifiableList(this.countryList);
+       }
+
+       @Override
+       public boolean hasCountries () {
+               return (!this.countryList.isEmpty());
        }
 
        /**