← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2637: Moved the remove-existing-aggregated-data step after the crosstab step in datamart

 

------------------------------------------------------------
revno: 2637
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-01-19 13:04:43 +0100
message:
  Moved the remove-existing-aggregated-data step after the crosstab step in datamart
modified:
  dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.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-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java	2011-01-11 13:11:31 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java	2011-01-19 12:04:43 +0000
@@ -202,18 +202,6 @@
 
         TimeUtils.start();
 
-        state.setMessage( "deleting_existing_aggregated_data" );
-
-        // ---------------------------------------------------------------------
-        // Delete existing aggregated data
-        // ---------------------------------------------------------------------
-
-        aggregatedDataValueService.deleteAggregatedDataValues( dataElementIds, periodIds, organisationUnitIds );
-
-        aggregatedDataValueService.deleteAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitIds );
-
-        log.info( "Deleted existing aggregated data: " + TimeUtils.getHMS() );
-        
         // ---------------------------------------------------------------------
         // Get objects
         // ---------------------------------------------------------------------
@@ -275,6 +263,18 @@
         nonCalculatedOperands.retainAll( allOperands );
         indicatorOperands.retainAll( allOperands );
         calculatedOperands.retainAll( allOperands );
+
+        // ---------------------------------------------------------------------
+        // Delete existing aggregated data
+        // ---------------------------------------------------------------------
+
+        state.setMessage( "deleting_existing_aggregated_data" );
+
+        aggregatedDataValueService.deleteAggregatedDataValues( dataElementIds, periodIds, organisationUnitIds );
+
+        aggregatedDataValueService.deleteAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitIds );
+
+        log.info( "Deleted existing aggregated data: " + TimeUtils.getHMS() );
         
         // ---------------------------------------------------------------------
         // Data element export