Пример #1
0
 public Properties get3rdAddrProp(String name) {
   Properties prop = new Properties();
   List<Billing3rdPartyAddress> results = dao.findByCompanyName(name);
   for (Billing3rdPartyAddress b : results) {
     prop.setProperty("id", b.getId().toString());
     prop.setProperty("attention", b.getAttention());
     prop.setProperty("company_name", b.getCompanyName());
     prop.setProperty("address", b.getAddress());
     prop.setProperty("city", b.getCity());
     prop.setProperty("province", b.getProvince());
     prop.setProperty("postcode", b.getPostalCode());
     prop.setProperty("telephone", b.getTelephone());
     prop.setProperty("fax", b.getFax());
   }
   return prop;
 }
Пример #2
0
  public Properties get3rdAddr(String id) {
    Properties prop = new Properties();
    Billing3rdPartyAddress b = dao.find(Integer.parseInt(id));
    if (b != null) {
      prop.setProperty("id", id);
      prop.setProperty("attention", b.getAttention());
      prop.setProperty("company_name", b.getCompanyName());
      prop.setProperty("address", b.getAddress());
      prop.setProperty("city", b.getCity());
      prop.setProperty("province", b.getProvince());
      prop.setProperty("postcode", b.getPostalCode());
      prop.setProperty("telephone", b.getTelephone());
      prop.setProperty("fax", b.getFax());
    }

    return prop;
  }