}
} catch (IllegalArgumentException e) {
throw new InvalidDateParamException(dateRangeParam);
}
LocaleStatistics localeStatistics = new LocaleStatistics();
List<Object[]> data =
textFlowTargetHistoryDAO.getUserTranslationHistoryInVersion(
version.getId(), person.getId(), fromDate, toDate);
for (Object[] entry : data) {
int count = ((BigDecimal) entry[0]).intValue();
ContentState state = ContentState.values()[(int) entry[1]];
LocaleId localeId = new LocaleId(entry[2].toString());
BaseTranslationCount stats;
if (localeStatistics.containsKey(localeId)) {
stats = localeStatistics.get(localeId);
} else {
stats = new BaseTranslationCount(0,0,0,0,0);
}
stats.set(state, count);
localeStatistics.put(localeId, stats);
}
ContributionStatistics result = new ContributionStatistics();
result.put(username, localeStatistics);