Package com.vst.dto

Examples of com.vst.dto.CustomersNavigationListDto


  }

  //список заказчиков для корня меню
  @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;
  }
View Full Code Here


      @Override
      public Object doInTransaction(TransactionStatus arg0) {
        long start = System.currentTimeMillis();
        //manager.getGeoTree();
        CustomersNavigationListDto res = manager.getCustomersForNavigationList();
        List<CustomerListItemDto> qList = res.getCustomers();

            long end = System.currentTimeMillis();
          System.out.println("Work time:" + (end - start) );
        return qList;
      }
View Full Code Here

TOP

Related Classes of com.vst.dto.CustomersNavigationListDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.