← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5579: Data mart, fixed minor issues

 

------------------------------------------------------------
revno: 5579
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-12-25 11:13:51 +0100
message:
  Data mart, fixed minor issues
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.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-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java	2011-12-19 21:33:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/DefaultAggregatedOrgUnitDataValueService.java	2011-12-25 10:13:51 +0000
@@ -1,14 +1,5 @@
 package org.hisp.dhis.aggregation;
 
-import java.util.Collection;
-
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
-import org.hisp.dhis.indicator.Indicator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.period.Period;
-
 /*
  * Copyright (c) 2004-2010, University of Oslo
  * All rights reserved.
@@ -36,6 +27,15 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Collection;
+
+import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
+import org.hisp.dhis.indicator.Indicator;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
+import org.hisp.dhis.period.Period;
+
 public class DefaultAggregatedOrgUnitDataValueService
     implements AggregatedOrgUnitDataValueService
 {
@@ -100,6 +100,6 @@
     
     public void deleteAggregatedIndicatorValues( Collection<Integer> periodIds )
     {
-        aggregatedDataValueStore.deleteAggregatedDataValues( periodIds );
+        aggregatedDataValueStore.deleteAggregatedIndicatorValues( periodIds );
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java	2011-12-10 17:55:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/aggregation/jdbc/JdbcAggregatedDataValueStore.java	2011-12-25 10:13:51 +0000
@@ -381,7 +381,7 @@
             try
             {
                 final String sql = "CREATE INDEX aggregateddatavalue_index ON aggregateddatavalue (dataelementid, categoryoptioncomboid, periodid, organisationunitid)";        
-                jdbcTemplate.execute( sql );
+                statementManager.getHolder().executeUpdate( sql, true );
             }
             catch ( Exception ex )
             {
@@ -394,7 +394,7 @@
             try
             {
                 final String sql = "CREATE INDEX aggregatedindicatorvalue_index ON aggregatedindicatorvalue (indicatorid, periodid, organisationunitid)";        
-                jdbcTemplate.execute( sql );
+                statementManager.getHolder().executeUpdate( sql, true );
             }
             catch ( Exception ex )
             {
@@ -410,7 +410,7 @@
             try
             {
                 final String sql = "DROP INDEX aggregateddatavalue_index";
-                jdbcTemplate.execute( sql );
+                statementManager.getHolder().executeUpdate( sql, true );
             }
             catch ( Exception ex )
             {
@@ -423,7 +423,7 @@
             try
             {
                 final String sql = "DROP INDEX aggregatedindicatorvalue_index";
-                jdbcTemplate.execute( sql );
+                statementManager.getHolder().executeUpdate( sql, true );
             }
             catch ( Exception ex )
             {