} else {
record.put(job.getKey(), new AtomicInteger(1));
}
}
MuninResults results = new MuninResults();
for (JobDescriptor job : jobDescriptorDAO.findAll()) {
MuninResult result = new MuninResult();
result.setKey(job.getKey());
if (record.containsKey(job.getKey())) {
AtomicInteger count = record.get(job.getKey());
result.setValue(String.valueOf(count.get()));
} else {
result.setValue("0");
}
results.add(result);
}
return results;
}