}
CountsHolder ch = new CountsHolder();
HibernateTemplate ht = getHibernateTemplate();
List<Object[]> loggedByList = ht.find("select item.space.id, count(item) from Item item"
+ " where item.loggedBy.id = ? group by item.space.id", user.getId());
List<Object[]> assignedToList = ht.find("select item.space.id, count(item) from Item item"
+ " where item.assignedTo.id = ? group by item.space.id", user.getId());
List<Object[]> statusList = ht.findByNamedParam("select item.space.id, count(item) from Item item"
+ " where item.space in (:spaces) group by item.space.id", "spaces", spaces);
for(Object[] oa : loggedByList) {
ch.addLoggedByMe((Long) oa[0], (Long) oa[1]);