← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9639: Enum rename

 

------------------------------------------------------------
revno: 9639
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-01-28 14:50:32 +0200
message:
  Enum rename
modified:
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AggregationType.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
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.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/AggregationType.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2013-01-27 14:20:01 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AggregationType.java	2013-01-28 12:50:32 +0000
@@ -29,5 +29,5 @@
 
 public enum AggregationType
 {
-    SUM, AVERAGE_INT_AGGREGATION, AVERAGE_INT_DISAGGREGATION, AVERAGE_BOOL, COUNT
+    SUM, AVERAGE_INT, AVERAGE_INT_DISAGGREGATION, AVERAGE_BOOL, COUNT
 }

=== 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	2013-01-28 10:55:48 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java	2013-01-28 12:50:32 +0000
@@ -95,24 +95,17 @@
     public DataQueryParams()
     {
     }
-    
-    public DataQueryParams( List<Dimension> dimensions, boolean categories, List<Dimension> filters )
-    {
-        this.dimensions = dimensions;
-        this.categories = categories;
-        this.filters = filters;
-    }
-    
+        
     public DataQueryParams( DataQueryParams params )
     {
         this.dimensions = new ArrayList<Dimension>( params.getDimensions() );
+        this.filters = new ArrayList<Dimension>( params.getFilters() );
         this.categories = params.isCategories();
-        this.filters = new ArrayList<Dimension>( params.getFilters() );
+        this.aggregationType = params.getAggregationType();
         
         this.tableName = params.getTableName();
         this.periodType = params.getPeriodType();
         this.organisationUnitLevel = params.getOrganisationUnitLevel();
-        this.aggregationType = params.getAggregationType();
         this.dataPeriodType = params.getDataPeriodType();
     }
 

=== 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	2013-01-27 21:03:02 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultQueryPlanner.java	2013-01-28 12:50:32 +0000
@@ -28,7 +28,7 @@
  */
 
 import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_AGGREGATION;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT;
 import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
 import static org.hisp.dhis.analytics.AggregationType.SUM;
 import static org.hisp.dhis.analytics.DataQueryParams.ORGUNIT_DIM_ID;
@@ -548,7 +548,7 @@
             {
                 if ( dataPeriodType == null || aggregationPeriodType.getFrequencyOrder() >= dataPeriodType.getFrequencyOrder() )
                 {
-                    map.putValue( AVERAGE_INT_AGGREGATION, element );
+                    map.putValue( AVERAGE_INT, element );
                 }
                 else
                 {

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java	2013-01-28 10:55:48 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java	2013-01-28 12:50:32 +0000
@@ -27,7 +27,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_AGGREGATION;
+import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT;
 import static org.hisp.dhis.analytics.AggregationType.AVERAGE_BOOL;
 import static org.hisp.dhis.analytics.AggregationType.AVERAGE_INT_DISAGGREGATION;
 import static org.hisp.dhis.analytics.AggregationType.COUNT;
@@ -100,7 +100,7 @@
         
         String sql = "select " + getCommaDelimitedString( selectDimensions ) + ", ";
         
-        if ( params.isAggregationType( AVERAGE_INT_AGGREGATION ) )
+        if ( params.isAggregationType( AVERAGE_INT ) )
         {
             sql += "sum(daysxvalue) / " + days;
         }