← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21395: Analytics, minor

 

------------------------------------------------------------
revno: 21395
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-12-09 18:59:01 +0100
message:
  Analytics, minor
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java
  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/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java
  dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.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/DataQueryParams.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2015-11-20 15:20:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2015-12-09 17:59:01 +0000
@@ -1022,7 +1022,7 @@
      * @param cocEnabled indicates whether the given aggregated data map includes
      *        a category option combination dimension.
      */
-    public static void putPermutationOperandValueMap( MapMap<String, DataElementOperand, Double> permutationMap, 
+    public static void putPermutationOperandValueMap( MapMap<String, DimensionalItemObject, Double> permutationMap, 
         Map<String, Double> aggregatedDataMap, boolean cocEnabled )
     {
         for ( String key : aggregatedDataMap.keySet() )

=== 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	2015-12-08 19:33:06 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-12-09 17:59:01 +0000
@@ -262,7 +262,7 @@
 
             List<List<DimensionItem>> dimensionItemPermutations = dataSourceParams.getDimensionItemPermutations();
 
-            Map<String, Map<DataElementOperand, Double>> permutationOperandValueMap = getPermutationOperandValueMap( dataSourceParams );
+            Map<String, Map<DimensionalItemObject, Double>> permutationOperandValueMap = getPermutationOperandValueMap( dataSourceParams );
 
             for ( Indicator indicator : indicators )
             {
@@ -867,12 +867,12 @@
      * 
      * @param params the data query parameters.
      */
-    private Map<String, Map<DataElementOperand, Double>> getPermutationOperandValueMap( DataQueryParams params )
+    private Map<String, Map<DimensionalItemObject, Double>> getPermutationOperandValueMap( DataQueryParams params )
     {
         Map<String, Double> aggregatedDataTotalsMap = getAggregatedDataValueMapTotals( params );
         Map<String, Double> aggregatedDataOptionCombosMap = getAggregatedDataValueMapOptionCombos( params );
         
-        MapMap<String, DataElementOperand, Double> permOperandValueMap = new MapMap<>();
+        MapMap<String, DimensionalItemObject, Double> permOperandValueMap = new MapMap<>();
 
         DataQueryParams.putPermutationOperandValueMap( permOperandValueMap, aggregatedDataTotalsMap, false );
         DataQueryParams.putPermutationOperandValueMap( permOperandValueMap, aggregatedDataOptionCombosMap, true );

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java	2015-11-20 15:20:20 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/data/QueryPlannerTest.java	2015-12-09 17:59:01 +0000
@@ -252,7 +252,7 @@
         aggregatedDataMap.put( deB.getUid() + DIMENSION_SEP + coc.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "2000Q1", 7d );
         aggregatedDataMap.put( deB.getUid() + DIMENSION_SEP + coc.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "2000Q2", 8d );
 
-        MapMap<String, DataElementOperand, Double> permutationMap = new MapMap<>();
+        MapMap<String, DimensionalItemObject, Double> permutationMap = new MapMap<>();
 
         DataQueryParams.putPermutationOperandValueMap( permutationMap, aggregatedDataMap, true );
 
@@ -263,10 +263,10 @@
         String ouBQ1Key = ouB.getUid() + DIMENSION_SEP + "2000Q1";
         String ouBQ2Key = ouB.getUid() + DIMENSION_SEP + "2000Q2";
 
-        Map<DataElementOperand, Double> ouAQ1 = permutationMap.get( ouAQ1Key );
-        Map<DataElementOperand, Double> ouAQ2 = permutationMap.get( ouAQ2Key );
-        Map<DataElementOperand, Double> ouBQ1 = permutationMap.get( ouBQ1Key );
-        Map<DataElementOperand, Double> ouBQ2 = permutationMap.get( ouBQ2Key );
+        Map<DimensionalItemObject, Double> ouAQ1 = permutationMap.get( ouAQ1Key );
+        Map<DimensionalItemObject, Double> ouAQ2 = permutationMap.get( ouAQ2Key );
+        Map<DimensionalItemObject, Double> ouBQ1 = permutationMap.get( ouBQ1Key );
+        Map<DimensionalItemObject, Double> ouBQ2 = permutationMap.get( ouBQ2Key );
 
         assertEquals( 2, ouAQ1.size() );
         assertEquals( 2, ouAQ2.size() );
@@ -311,7 +311,7 @@
         aggregatedDataMap.put( deB.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "200101", 7d );
         aggregatedDataMap.put( deB.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "200102", 8d );
 
-        MapMap<String, DataElementOperand, Double> permutationMap = new MapMap<>();
+        MapMap<String, DimensionalItemObject, Double> permutationMap = new MapMap<>();
 
         DataQueryParams.putPermutationOperandValueMap( permutationMap, aggregatedDataMap, false );
 
@@ -322,10 +322,10 @@
         String ouBM1Key = ouB.getUid() + DIMENSION_SEP + "200101";
         String ouBM2Key = ouB.getUid() + DIMENSION_SEP + "200102";
 
-        Map<DataElementOperand, Double> ouAM1 = permutationMap.get( ouAM1Key );
-        Map<DataElementOperand, Double> ouAM2 = permutationMap.get( ouAM2Key );
-        Map<DataElementOperand, Double> ouBM1 = permutationMap.get( ouBM1Key );
-        Map<DataElementOperand, Double> ouBM2 = permutationMap.get( ouBM2Key );
+        Map<DimensionalItemObject, Double> ouAM1 = permutationMap.get( ouAM1Key );
+        Map<DimensionalItemObject, Double> ouAM2 = permutationMap.get( ouAM2Key );
+        Map<DimensionalItemObject, Double> ouBM1 = permutationMap.get( ouBM1Key );
+        Map<DimensionalItemObject, Double> ouBM2 = permutationMap.get( ouBM2Key );
 
         assertEquals( 2, ouAM1.size() );
         assertEquals( 2, ouAM2.size() );
@@ -372,7 +372,7 @@
         aggregatedCocDataMap.put( deB.getUid() + DIMENSION_SEP + coc.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "2000Q1", 7d );
         aggregatedCocDataMap.put( deB.getUid() + DIMENSION_SEP + coc.getUid() + DIMENSION_SEP + ouB.getUid() + DIMENSION_SEP + "2000Q2", 8d );
 
-        MapMap<String, DataElementOperand, Double> permutationMap = new MapMap<>();
+        MapMap<String, DimensionalItemObject, Double> permutationMap = new MapMap<>();
 
         DataQueryParams.putPermutationOperandValueMap( permutationMap, aggregatedTotalsDataMap, false );
         DataQueryParams.putPermutationOperandValueMap( permutationMap, aggregatedCocDataMap, true );
@@ -384,10 +384,10 @@
         String ouBQ1Key = ouB.getUid() + DIMENSION_SEP + "2000Q1";
         String ouBQ2Key = ouB.getUid() + DIMENSION_SEP + "2000Q2";
 
-        Map<DataElementOperand, Double> ouAQ1 = permutationMap.get( ouAQ1Key );
-        Map<DataElementOperand, Double> ouAQ2 = permutationMap.get( ouAQ2Key );
-        Map<DataElementOperand, Double> ouBQ1 = permutationMap.get( ouBQ1Key );
-        Map<DataElementOperand, Double> ouBQ2 = permutationMap.get( ouBQ2Key );
+        Map<DimensionalItemObject, Double> ouAQ1 = permutationMap.get( ouAQ1Key );
+        Map<DimensionalItemObject, Double> ouAQ2 = permutationMap.get( ouAQ2Key );
+        Map<DimensionalItemObject, Double> ouBQ1 = permutationMap.get( ouBQ1Key );
+        Map<DimensionalItemObject, Double> ouBQ2 = permutationMap.get( ouBQ2Key );
 
         assertEquals( 2, ouAQ1.size() );
         assertEquals( 2, ouAQ2.size() );

=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java	2015-10-12 15:02:17 +0000
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/commons/collection/ListUtils.java	2015-12-09 17:59:01 +0000
@@ -81,7 +81,7 @@
      * 
      * @param <T> type.
      * @param list the list to operate on.
-     * @param indexes the list to remove elements from.
+     * @param indexes the indexes to remove elements in the list from.
      */
     public static <T> void removeAll( List<T> list, Integer... indexes )
     {