← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14452: Renamed property DimensionalObject.type to .dimensionType

 

------------------------------------------------------------
revno: 14452
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-03-26 20:33:00 +0100
message:
  Renamed property DimensionalObject.type to .dimensionType
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.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/DefaultAnalyticsService.java
  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/event/data/DefaultEventAnalyticsService.java
  dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryParamsTest.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	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseDimensionalObject.java	2014-03-26 19:33:00 +0000
@@ -48,7 +48,7 @@
     /**
      * The type of this dimension.
      */
-    private DimensionType type;
+    private DimensionType dimensionType;
 
     /**
      * The name of this dimension. For the dynamic dimensions this will be equal
@@ -81,25 +81,25 @@
         this.items = new ArrayList<NameableObject>( items );
     }
     
-    public BaseDimensionalObject( String dimension, DimensionType type, List<? extends NameableObject> items )
+    public BaseDimensionalObject( String dimension, DimensionType dimensionType, List<? extends NameableObject> items )
     {
         this.uid = dimension;
-        this.type = type;
+        this.dimensionType = dimensionType;
         this.items = new ArrayList<NameableObject>( items );
     }
 
-    public BaseDimensionalObject( String dimension, DimensionType type, String dimensionName, List<? extends NameableObject> items )
+    public BaseDimensionalObject( String dimension, DimensionType dimensionType, String dimensionName, List<? extends NameableObject> items )
     {
         this.uid = dimension;
-        this.type = type;
+        this.dimensionType = dimensionType;
         this.dimensionName = dimensionName;
         this.items = new ArrayList<NameableObject>( items );
     }
 
-    public BaseDimensionalObject( String dimension, DimensionType type, String dimensionName, String displayName, List<? extends NameableObject> items )
+    public BaseDimensionalObject( String dimension, DimensionType dimensionType, String dimensionName, String displayName, List<? extends NameableObject> items )
     {
         this.uid = dimension;
-        this.type = type;
+        this.dimensionType = dimensionType;
         this.dimensionName = dimensionName;
         this.displayName = displayName;
         this.items = new ArrayList<NameableObject>( items );
@@ -154,14 +154,14 @@
     @JsonProperty
     @JsonView( {DimensionalView.class} )
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-    public DimensionType getType()
+    public DimensionType getDimensionType()
     {
-        return type;
+        return dimensionType;
     }
 
-    public void setType( DimensionType type )
+    public void setDimensionType( DimensionType dimensionType )
     {
-        this.type = type;
+        this.dimensionType = dimensionType;
     }
 
     @Override
@@ -188,6 +188,6 @@
     @Override
     public String toString()
     {
-        return "[" + uid + ", type: " + type  + ", " + items + "]";
+        return "[" + uid + ", type: " + dimensionType  + ", " + items + "]";
     }
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java	2014-03-24 14:16:32 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/DimensionalObject.java	2014-03-26 19:33:00 +0000
@@ -72,7 +72,7 @@
     /**
      * Gets the dimension type.
      */
-    DimensionType getType();
+    DimensionType getDimensionType();
     
     /**
      * Gets the dimension name, which corresponds to a column in the analytics

=== 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	2014-03-26 09:25:45 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2014-03-26 19:33:00 +0000
@@ -314,7 +314,7 @@
         
         for ( int i = 0; i < dimensions.size(); i++ )
         {
-            if ( COMPLETENESS_DIMENSION_TYPES.contains( dimensions.get( i ).getType() ) )
+            if ( COMPLETENESS_DIMENSION_TYPES.contains( dimensions.get( i ).getDimensionType() ) )
             {
                 indexes.add( i );
             }
@@ -332,7 +332,7 @@
         
         for ( int i = 0; i < filters.size(); i++ )
         {
-            if ( COMPLETENESS_DIMENSION_TYPES.contains( filters.get( i ).getType() ) )
+            if ( COMPLETENESS_DIMENSION_TYPES.contains( filters.get( i ).getDimensionType() ) )
             {
                 indexes.add( i );
             }
@@ -351,7 +351,7 @@
         
         while ( dimensionIter.hasNext() )
         {
-            if ( !dimensionIter.next().getType().equals( type ) )
+            if ( !dimensionIter.next().getDimensionType().equals( type ) )
             {
                 dimensionIter.remove();
             }
@@ -361,7 +361,7 @@
         
         while ( filterIter.hasNext() )
         {
-            if ( !filterIter.next().getType().equals( type ) )
+            if ( !filterIter.next().getDimensionType().equals( type ) )
             {
                 filterIter.remove();
             }
@@ -402,7 +402,7 @@
         {
             DimensionalObject dimension = iterator.next();
             
-            if ( DimensionType.CATEGORY.equals( dimension.getType() ) )
+            if ( DimensionType.CATEGORY.equals( dimension.getDimensionType() ) )
             {
                 iterator.remove();
             }
@@ -838,7 +838,7 @@
         {
             DimensionalObject existing = filters.get( index );
             
-            filters.set( index, new BaseDimensionalObject( existing.getDimension(), existing.getType(), existing.getDimensionName(), options ) );
+            filters.set( index, new BaseDimensionalObject( existing.getDimension(), existing.getDimensionType(), existing.getDimensionName(), options ) );
         }
         
         return this;
@@ -1296,7 +1296,7 @@
         
         for ( DimensionalObject dimension : dimensions )
         {
-            if ( DimensionType.DATAELEMENT_GROUPSET.equals( dimension.getType() ) )
+            if ( DimensionType.DATAELEMENT_GROUPSET.equals( dimension.getDimensionType() ) )
             {
                 list.add( dimension );
             }
@@ -1304,7 +1304,7 @@
         
         for ( DimensionalObject filter : filters )
         {
-            if ( DimensionType.DATAELEMENT_GROUPSET.equals( filter.getType() ) )
+            if ( DimensionType.DATAELEMENT_GROUPSET.equals( filter.getDimensionType() ) )
             {
                 list.add( filter );
             }

=== 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-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2014-03-26 19:33:00 +0000
@@ -1026,7 +1026,7 @@
         {
             List<NameableObject> items = new ArrayList<NameableObject>( dimension.getItems() );
 
-            boolean hierarchy = hierarchyMeta && DimensionType.ORGANISATIONUNIT.equals( dimension.getType() );
+            boolean hierarchy = hierarchyMeta && DimensionType.ORGANISATIONUNIT.equals( dimension.getDimensionType() );
             
             // -----------------------------------------------------------------
             // If dimension is not fixed and has no options, insert all options
@@ -1034,15 +1034,15 @@
             
             if ( !FIXED_DIMS.contains( dimension.getDimension() ) && items.isEmpty() )
             {
-                if ( DimensionType.ORGANISATIONUNIT_GROUPSET.equals( dimension.getType() ) )
+                if ( DimensionType.ORGANISATIONUNIT_GROUPSET.equals( dimension.getDimensionType() ) )
                 {
                     items = asList( organisationUnitGroupService.getOrganisationUnitGroupSet( dimension.getDimension() ).getOrganisationUnitGroups() );
                 }
-                else if ( DimensionType.DATAELEMENT_GROUPSET.equals( dimension.getType() ) )
+                else if ( DimensionType.DATAELEMENT_GROUPSET.equals( dimension.getDimensionType() ) )
                 {
                     items = asList( dataElementService.getDataElementGroupSet( dimension.getDimension() ).getMembers() );
                 }
-                else if ( DimensionType.CATEGORY.equals( dimension.getType() ) )
+                else if ( DimensionType.CATEGORY.equals( dimension.getDimensionType() ) )
                 {
                     items = asList( categoryService.getDataElementCategory( dimension.getDimension() ).getCategoryOptions() );
                 }

=== 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	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2014-03-26 19:33:00 +0000
@@ -316,7 +316,7 @@
             for ( List<NameableObject> valuePage : valuePages )
             {
                 DataQueryParams subQuery = query.instance();
-                subQuery.setDimensionOptions( dim.getDimension(), dim.getType(), dim.getDimensionName(), valuePage );
+                subQuery.setDimensionOptions( dim.getDimension(), dim.getDimensionType(), dim.getDimensionName(), valuePage );
                 subQueries.add( subQuery );
             }
         }
@@ -416,7 +416,7 @@
             
             for ( String periodType : periodTypePeriodMap.keySet() )
             {
-                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getType(), periodType.toLowerCase(), periodTypePeriodMap.get( periodType ) ) );
+                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getDimensionType(), periodType.toLowerCase(), periodTypePeriodMap.get( periodType ) ) );
             }
             
             queries.add( params );
@@ -460,7 +460,7 @@
             
             for ( Integer level : levelOrgUnitMap.keySet() )
             {
-                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getType(), LEVEL_PREFIX + level, levelOrgUnitMap.get( level ) ) );
+                params.getFilters().add( new BaseDimensionalObject( filter.getDimension(), filter.getDimensionType(), LEVEL_PREFIX + level, levelOrgUnitMap.get( level ) ) );
             }
             
             queries.add( params );

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-03-26 09:25:45 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/DefaultEventAnalyticsService.java	2014-03-26 19:33:00 +0000
@@ -461,7 +461,7 @@
 
         for ( DimensionalObject dimension : dimensions )
         {
-            boolean hierarchy = hierarchyMeta && DimensionType.ORGANISATIONUNIT.equals( dimension.getType() );
+            boolean hierarchy = hierarchyMeta && DimensionType.ORGANISATIONUNIT.equals( dimension.getDimensionType() );
 
             for ( IdentifiableObject idObject : dimension.getItems() )
             {

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryParamsTest.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryParamsTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/DataQueryParamsTest.java	2014-03-26 19:33:00 +0000
@@ -128,7 +128,7 @@
         params.pruneToDimensionType( DimensionType.ORGANISATIONUNIT );
         
         assertEquals( 1, params.getDimensions().size() );
-        assertEquals( DimensionType.ORGANISATIONUNIT, params.getDimensions().get( 0 ).getType() );
+        assertEquals( DimensionType.ORGANISATIONUNIT, params.getDimensions().get( 0 ).getDimensionType() );
         assertEquals( 0, params.getFilters().size() );
     }
 }