use of org.apereo.portal.events.aggr.tabrender.TabRenderAggregation in project uPortal by Jasig.
the class TabRenderStatisticsController method createColumnDiscriminatorMap.
protected Map<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>> createColumnDiscriminatorMap(TabRenderReportForm form) {
//Collections used to track the queried groups and the results
final Map<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>> groupedAggregations = new TreeMap<TabRenderAggregationDiscriminator, SortedSet<TabRenderAggregation>>(TabRenderAggregationDiscriminatorImpl.Comparator.INSTANCE);
//Get concrete group mapping objects that are being queried for
List<Long> groups = form.getGroups();
List<Long> tabs = form.getTabs();
for (final Long queryGroupId : groups) {
AggregatedGroupMapping groupMapping = this.aggregatedGroupDao.getGroupMapping(queryGroupId);
for (final Long tabId : tabs) {
AggregatedTabMapping tabMapping = this.aggregatedTabLookupDao.getTabMapping(tabId);
final TabRenderAggregationDiscriminator mapping = new TabRenderAggregationDiscriminatorImpl(groupMapping, tabMapping);
//Create the set the aggregations for this report column will be stored in, sorted chronologically
final SortedSet<TabRenderAggregation> aggregations = new TreeSet<TabRenderAggregation>(BaseAggregationDateTimeComparator.INSTANCE);
//Map the group to the set
groupedAggregations.put(mapping, aggregations);
}
}
return groupedAggregations;
}
Aggregations