public static List<Deal> getDealList(Map<Integer, Deal> map) {
    List<Deal> dealList = new ArrayList<Deal>();
    dealList.addAll(map.values());
    Collections.sort(dealList, new Comparator<Deal>() {
      public int compare(Deal o1, Deal o2) {
        return o1.getId() - o2.getId();
      }
    });
    return dealList;
  }