use of org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator 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;
}
use of org.apereo.portal.events.aggr.tabrender.TabRenderAggregationDiscriminator in project uPortal by Jasig.
the class TabRenderStatisticsController method createAggregationsQueryKeyset.
@Override
protected Set<TabRenderAggregationKey> createAggregationsQueryKeyset(Set<TabRenderAggregationDiscriminator> columnDiscriminators, TabRenderReportForm form) {
// Create keys (that exclude the temporal date/time information) from the interval
// and the data in the column discriminators.
final AggregationInterval interval = form.getInterval();
final HashSet<TabRenderAggregationKey> keys = new HashSet<TabRenderAggregationKey>();
for (TabRenderAggregationDiscriminator discriminator : columnDiscriminators) {
keys.add(new TabRenderAggregationKeyImpl(interval, discriminator.getAggregatedGroup(), discriminator.getTabMapping()));
}
return keys;
}
Aggregations