dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15046
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5276: Minor fix
------------------------------------------------------------
revno: 5276
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-12-03 18:32:57 +0100
message:
Minor fix
modified:
dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/dataelement/DefaultDataElementDataMart.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/dataelement/DefaultDataElementDataMart.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/dataelement/DefaultDataElementDataMart.java 2011-11-03 13:26:09 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/dataelement/DefaultDataElementDataMart.java 2011-12-03 17:32:57 +0000
@@ -153,6 +153,8 @@
final BatchHandler<Object> cacheHandler = inMemoryBatchHandlerFactory.createBatchHandler( GenericBatchHandler.class ).setTableName( AGGREGATEDDATA_CACHE_PREFIX + key ).init();
final OrganisationUnitHierarchy hierarchy = organisationUnitService.getOrganisationUnitHierarchy().prepareChildren( organisationUnits );
+
+ final Map<DataElementOperand, Double> valueMap = new HashMap<DataElementOperand, Double>();
final AggregatedDataValue aggregatedValue = new AggregatedDataValue();
@@ -170,10 +172,9 @@
final int level = aggregationCache.getLevelOfOrganisationUnit( unit.getId() );
- final Map<DataElementOperand, Double> valueMap = new HashMap<DataElementOperand, Double>();
-
final Collection<Integer> orgUnitChildren = hierarchy.getChildren( unit.getId() );
+ valueMap.clear();
valueMap.putAll( sumIntAggregator.getAggregatedValues( sumIntOperands, period, level, orgUnitChildren, key ) );
valueMap.putAll( averageIntAggregator.getAggregatedValues( averageIntOperands, period, level, orgUnitChildren, key ) );
valueMap.putAll( averageIntSingleValueAggregator.getAggregatedValues( averageIntSingleValueOperands, period, level, orgUnitChildren, key ) );