if (StringUtils.isEmpty(name))
name = "Unknown";
// if (i<limit && (Integer)result.getVal(i)>0){
if (i < limit && !name.equals("Unknown"))
{
limitedData.add(new StatisticDatasBeanRow(name,
result.getVal(i)));
}
else
{
other += (Integer) result.getVal(i);
}
fullData.add(new StatisticDatasBeanRow(name, result
.getVal(i)));
}
}
catch (Exception e)
{
fullData.add(new StatisticDatasBeanRow(_NotAvailable, null));
limitedData.add(new StatisticDatasBeanRow(_NotAvailable,
null));
e.printStackTrace();
}
}
if (result.size() > limit && other > 0)
{
limitedData.add(new StatisticDatasBeanRow(_OTHER, other));
}
pieStatisticBean.setHits(result.size());
pieStatisticBean.setDataTable(fullData);
pieStatisticBean.setLimitedDataTable(limitedData);
try
{
pieStatisticBean.setPercentages();
}
catch (Exception e)
{
e.printStackTrace();
}
}
catch (Exception e)
{
log.warn(e.getMessage());
fullData.add(new StatisticDatasBeanRow(_NotAvailable, null));
limitedData.add(new StatisticDatasBeanRow(_NotAvailable, null));
}
return pieStatisticBean;
}