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; }
public City getCity() { if (this.selectedCity != null && !this.selectedCity.isEmpty()) { return locationBean.findCity(this.selectedCity); } else { return null; } }
public Province getProvince() { if (this.selectedProvince != null && !this.selectedProvince.isEmpty()) { return locationBean.findProvince(this.selectedProvince); } else { return null; } }
public Country getCountry() { if (this.selectedCountry != null) { return locationBean.findCountry(this.selectedCountry); } else { return null; } }
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; }
public List<Province> getProvinces() { if (this.selectedCountry != null) { Country country = new Country(selectedCountry); this.provinces = locationBean.findProvinces(country); return this.provinces; } else { return null; } }
public List<Country> getCountries() { this.countries = locationBean.findCountries(); return this.countries; }