dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15067
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5294: Minor fix
------------------------------------------------------------
revno: 5294
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-12-05 19:54:20 +0100
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java
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-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java 2011-07-26 07:39:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitHierarchy.java 2011-12-05 18:54:20 +0000
@@ -40,7 +40,7 @@
*/
public class OrganisationUnitHierarchy
{
- private Map<Integer, Collection<Integer>> preparedRelationships = new HashMap<Integer, Collection<Integer>>();
+ private Map<Integer, Set<Integer>> preparedRelationships = new HashMap<Integer, Set<Integer>>();
private Map<Integer, Set<Integer>> relationships = new HashMap<Integer, Set<Integer>>();
@@ -82,7 +82,7 @@
return this;
}
- public Collection<Integer> getChildren( int parentId )
+ public Set<Integer> getChildren( int parentId )
{
if ( preparedRelationships.containsKey( parentId ) )
{
@@ -107,10 +107,10 @@
}
}
- return children;
+ return new HashSet<Integer>( children );
}
- public Collection<Integer> getChildren( Collection<Integer> parentIds )
+ public Set<Integer> getChildren( Collection<Integer> parentIds )
{
Set<Integer> children = new HashSet<Integer>();
=== 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-11-03 15:30:48 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/engine/DefaultDataMartEngine.java 2011-12-05 18:54:20 +0000
@@ -226,7 +226,7 @@
state.setMessage( "crosstabulating_data" );
Collection<Integer> intersectingPeriodIds = ConversionUtils.getIdentifiers( Period.class, periodService.getIntersectionPeriods( periods ) );
- Collection<Integer> childrenIds = organisationUnitService.getOrganisationUnitHierarchy().getChildren( organisationUnitIds );
+ Set<Integer> childrenIds = organisationUnitService.getOrganisationUnitHierarchy().getChildren( organisationUnitIds );
List<List<Integer>> childrenPages = new PaginatedList<Integer>( childrenIds ).setNumberOfPages( cpuCores ).getPages();
List<DataElementOperand> crossTabOperands = new ArrayList<DataElementOperand>( allOperands );