Esempio n. 1
0
 public List<City> getCities() {
   if (selectedCountry != null && selectedProvince == null) {
     Country country = new Country(selectedCountry);
     this.cities = locationBean.findCities(country, false);
   } else if (selectedProvince != null) {
     Province province = new Province(selectedProvince);
     this.cities = locationBean.findCities(province, false);
   }
   return this.cities;
 }
Esempio n. 2
0
 public City getCity() {
   if (this.selectedCity != null && !this.selectedCity.isEmpty()) {
     return locationBean.findCity(this.selectedCity);
   } else {
     return null;
   }
 }
Esempio n. 3
0
 public Province getProvince() {
   if (this.selectedProvince != null && !this.selectedProvince.isEmpty()) {
     return locationBean.findProvince(this.selectedProvince);
   } else {
     return null;
   }
 }
Esempio n. 4
0
 public Country getCountry() {
   if (this.selectedCountry != null) {
     return locationBean.findCountry(this.selectedCountry);
   } else {
     return null;
   }
 }
Esempio n. 5
0
 public List<String> findCitiesStartingWith(String initials) {
   List<City> cits = locationBean.findCitiesStartingWith(initials);
   List<String> citiesStartingWith = new ArrayList<String>();
   for (City city : cits) {
     citiesStartingWith.add(city.getName());
   }
   return citiesStartingWith;
 }
Esempio n. 6
0
 public List<Province> getProvinces() {
   if (this.selectedCountry != null) {
     Country country = new Country(selectedCountry);
     this.provinces = locationBean.findProvinces(country);
     return this.provinces;
   } else {
     return null;
   }
 }
Esempio n. 7
0
 public List<Country> getCountries() {
   this.countries = locationBean.findCountries();
   return this.countries;
 }