import javax.faces.view.facelets.FaceletException;
import javax.inject.Inject;
import javax.inject.Named;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.data.CountryData;
-import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
+import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jcountry.model.data.CountryData;
+import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote;
import org.mxchange.jcountry.events.AdminAddedCountryEvent;
import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent;
import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
/**
* Remote country EJB
*/
- @EJB (lookup = "java:global/jjobs-ejb/country!org.mxchange.jcountry.data.CountrySingletonBeanRemote")
+ @EJB (lookup = "java:global/jjobs-ejb/country!org.mxchange.jcountry.model.data.CountrySingletonBeanRemote")
private CountrySingletonBeanRemote countryBean;
/**
*/
public String addCountry () {
// Create new country object
- Country country = new CountryData();
+ final Country country = new CountryData();
// Add all data
country.setCountryAbroadDialPrefix(this.getCountryAbroadDialPrefix());
}
// Init variable
- Country updatedCountry = null;
+ final Country updatedCountry;
try {
// Send country to bean
boolean isAdded = false;
// Now get whole ist
- List<Country> countries = this.countryController.allCountries();
+ final List<Country> countries = this.countryController.allCountries();
// Get iterator from it
- Iterator<Country> iterator = countries.iterator();
+ final Iterator<Country> iterator = countries.iterator();
// Check whole list
while (iterator.hasNext()) {
// Get next country
- Country next = iterator.next();
+ final Country next = iterator.next();
// Is country code or i18n the same?
if ((Objects.equals(country.getCountryCode(), next.getCountryCode())) || (Objects.equals(country.getCountryI18nKey(), next.getCountryI18nKey()))) {