Esempio n. 1
0
  /** @return */
  private String[][] getAddressColumns(final int[] columnWidth) {

    String[][] columns;
    if (customer != null) {
      Address address;
      final String[] filter = getAddressFilter();
      final Collection<Business> list = AddressController.getAddresses(filter);
      columns = new String[list.size()][];
      final Iterator<Business> it = list.iterator();
      int i = 0;
      while (it.hasNext()) {
        address = (Address) it.next();
        columns[i] =
            new String[] {
              address.getIdAddress(),
              CodeController.getOneCodeDetail(CodeEnum.ADDRESS_TYPE.getType(), address.getAddType())
                  .getCodeDesc(),
              address.getAddStreet(),
              address.getAddNumber(),
              address.getAddBox(),
              address.getAddZip(),
              address.getAddCity(),
              CodeController.getOneCodeDetail(CodeEnum.COUNTRY.getType(), address.getAddCountry())
                  .getCodeDesc()
            };
        calculateColumnWidth(columns[i], columnWidth);

        i++;
      }
    } else {
      columns = null;
    }
    return columns;
  }