}
//список заказчиков для корня меню
@SuppressWarnings("unchecked")
public CustomersNavigationListDto getCustomersForNavigationList(){
CustomersNavigationListDto res = new CustomersNavigationListDto();
List<CustomerListItemDto> customers = new ArrayList<CustomerListItemDto>();
List<Person> contacts = new ArrayList<Person>();
List<GeoClassificator> countries = new ArrayList<GeoClassificator>();
List<GeoClassificator> provincies = new ArrayList<GeoClassificator>();
List<GeoClassificator> cities = new ArrayList<GeoClassificator>();
List<Organization> dblist =
(List<Organization>) gatewayDao.getCustomers();
for(Organization item : dblist){
CustomerListItemDto dto = new CustomerListItemDto(item);
countries.add(item.getAddress().getCountry());
provincies.add(item.getAddress().getProvince());
cities.add(item.getAddress().getCity());
contacts.addAll(item.getContacts());
customers.add(dto);
}
res.setCustomers(customers);
res.setCities((List<GeoClassificator>)getCityList(extractKeys(cities)));
res.setContacts((List<Person>)getContactsList((extractKeys(contacts))));
res.setProvincies((List<GeoClassificator>)getProvinceList(extractKeys(provincies)));
res.setCountries((List<GeoClassificator>)getCountryList((extractKeys(countries))));
return res;
}