Пример #1
0
 @Override
 public void visitName(TransactionName name) {
   if (name.getId().indexOf("2529898") > -1) {
     System.out.println(name.getId());
   }
   super.visitName(name);
 }
Пример #2
0
  private void buildTransactionNamePieChart(List<TransactionNameModel> names, Model model) {
    PieChart chart = new PieChart();
    List<Item> items = new ArrayList<Item>();

    for (int i = 1; i < names.size(); i++) {
      TransactionNameModel name = names.get(i);
      Item item = new Item();
      TransactionName transaction = name.getDetail();
      item.setNumber(transaction.getTotalCount()).setTitle(transaction.getId());
      items.add(item);
    }

    chart.addItems(items);
    model.setPieChart(new JsonBuilder().toJson(chart));
  }