if (includeFinished != null && includeFinished) {
query.includeFinished();
}
if (includeCompleteScope != null && includeCompleteScope) {
query.includeCompleteScope();
}
setSortOptions(query, sortOrder, sortBy);
List<HistoricActivityStatisticsDto> result = new ArrayList<HistoricActivityStatisticsDto>();