← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18165: BaseDimensionalObject, removed constructor

 

------------------------------------------------------------
revno: 18165
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-02-03 15:33:39 +0100
message:
  BaseDimensionalObject, removed constructor
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
  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/DefaultQueryPlanner.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-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2015-02-03 14:22:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2015-02-03 14:33:39 +0000
@@ -90,14 +90,6 @@
         this.items = new ArrayList<>( items );
     }
 
-    public BaseDimensionalObject( String dimension, DimensionType dimensionType, String dimensionName, List<? extends NameableObject> items )
-    {
-        this.uid = dimension;
-        this.dimensionType = dimensionType;
-        this.dimensionName = dimensionName;
-        this.items = new ArrayList<>( items );
-    }
-
     public BaseDimensionalObject( String dimension, DimensionType dimensionType, String dimensionName, String displayName, List<? extends NameableObject> items )
     {
         this.uid = dimension;

=== 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-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2015-02-03 14:33:39 +0000
@@ -817,11 +817,11 @@
         
         if ( index != -1 )
         {
-            dimensions.set( index, new BaseDimensionalObject( dimension, type, dimensionName, options ) );
+            dimensions.set( index, new BaseDimensionalObject( dimension, type, dimensionName, null, options ) );
         }
         else
         {
-            dimensions.add( new BaseDimensionalObject( dimension, type, dimensionName, options ) );
+            dimensions.add( new BaseDimensionalObject( dimension, type, dimensionName, null, options ) );
         }
         
         return this;
@@ -856,11 +856,11 @@
         
         if ( index != -1 )
         {
-            filters.set( index, new BaseDimensionalObject( filter, type, dimensionName, options ) );
+            filters.set( index, new BaseDimensionalObject( filter, type, dimensionName, null, options ) );
         }
         else
         {
-            filters.add( new BaseDimensionalObject( filter, type, dimensionName, options ) );
+            filters.add( new BaseDimensionalObject( filter, type, dimensionName, null, options ) );
         }
         
         return this;
@@ -877,7 +877,8 @@
         {
             DimensionalObject existing = filters.get( index );
             
-            filters.set( index, new BaseDimensionalObject( existing.getDimension(), existing.getDimensionType(), existing.getDimensionName(), options ) );
+            filters.set( index, new BaseDimensionalObject( existing.getDimension(), 
+                existing.getDimensionType(), existing.getDimensionName(), existing.getDisplayName(), options ) );
         }
         
         return this;

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2015-02-03 14:33:39 +0000
@@ -457,7 +457,8 @@
             
             for ( String periodType : periodTypePeriodMap.keySet() )
             {
-                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getDimensionType(), periodType.toLowerCase(), periodTypePeriodMap.get( periodType ) ) );
+                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), 
+                    filter.getDimensionType(), periodType.toLowerCase(), filter.getDisplayName(), periodTypePeriodMap.get( periodType ) ) );
             }
             
             queries.add( params );
@@ -502,7 +503,8 @@
             
             for ( Integer level : levelOrgUnitMap.keySet() )
             {
-                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getDimensionType(), LEVEL_PREFIX + level, levelOrgUnitMap.get( level ) ) );
+                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), 
+                    filter.getDimensionType(), LEVEL_PREFIX + level, filter.getDisplayName(), levelOrgUnitMap.get( level ) ) );
             }
             
             queries.add( params );