← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14751: Javadoc

 

------------------------------------------------------------
revno: 14751
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-08 19:05:58 +0200
message:
  Javadoc
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2014-04-01 12:44:59 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2014-04-08 17:05:58 +0000
@@ -197,7 +197,7 @@
     }
 
     // -------------------------------------------------------------------------
-    // Implementation
+    // Methods for retrieving aggregated data
     // -------------------------------------------------------------------------
 
     @Override
@@ -493,6 +493,27 @@
         return getAggregatedDataValueMapping( grid );
     }
     
+    @Override
+    public Map<String, Double> getAggregatedDataValueMapping( BaseAnalyticalObject object, I18nFormat format )
+    {
+        DataQueryParams params = getFromAnalyticalObject( object, format );
+        
+        return getAggregatedDataValueMapping( params );
+    }
+
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+
+    /**
+     * Generates a mapping of permutations keys (org unit id or null) and mappings
+     * of org unit group and counts.
+     * 
+     * @param params the data query params.
+     * @param indicators the indicators for which formulas to scan for org unit 
+     *        groups.
+     * @return a map of maps.
+     */
     private Map<String, Map<String, Integer>> getOrgUnitTargetMap( DataQueryParams params, Collection<Indicator> indicators )
     {
         Set<OrganisationUnitGroup> orgUnitGroups = expressionService.getOrganisationUnitGroupsInIndicators( indicators );
@@ -545,14 +566,6 @@
         return map;
     }
 
-    @Override
-    public Map<String, Double> getAggregatedDataValueMapping( BaseAnalyticalObject object, I18nFormat format )
-    {
-        DataQueryParams params = getFromAnalyticalObject( object, format );
-        
-        return getAggregatedDataValueMapping( params );
-    }
-
     /**
      * Generates aggregated values for the given query. Creates a mapping between 
      * a dimension key and the aggregated value. The dimension key is a 
@@ -659,7 +672,11 @@
         
         return map;
     }
-    
+
+    // -------------------------------------------------------------------------
+    // Methods for assembling DataQueryParams
+    // -------------------------------------------------------------------------
+
     @Override
     public DataQueryParams getFromUrl( Set<String> dimensionParams, Set<String> filterParams, AggregationType aggregationType, 
         String measureCriteria, boolean skipMeta, boolean skipRounding, boolean hierarchyMeta, boolean ignoreLimit, boolean hideEmptyRows, boolean showHierarchy, I18nFormat format )