Datastore.getAsMap(AccessCounter.class, countMap.keySet());
Iterator<Entry<Key, Integer>> i = countMap.entrySet().iterator();
while (i.hasNext()) {
Entry<Key, Integer> next = i.next();
Key counterKey = next.getKey();
AccessCounter counter;
if (counterEntitiesMap.containsKey(counterKey)) {
counter = counterEntitiesMap.get(counterKey);
} else {
counter = new AccessCounter();
counterEntitiesMap.put(counterKey, counter);
counter.setKey(counterKey);
Minutes minutes =
Datastore.get(
Minutes.class,
Datastore.createKey(Minutes.class, counterKey.getId()));
counter.setMinutesTitle(minutes.getTitle());
}
counter.setCount(counter.getCount() + next.getValue());
}
return counterEntitiesMap.values();
}