← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5323: Added methods to orgunit service

 

------------------------------------------------------------
revno: 5323
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-12-07 15:10:29 +0100
message:
  Added methods to orgunit service
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.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/OrganisationUnitService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java	2011-12-03 14:31:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java	2011-12-07 14:10:29 +0000
@@ -271,6 +271,10 @@
 
     void filterOrganisationUnitsWithoutData( Collection<OrganisationUnit> organisationUnits );
 
+    Collection<OrganisationUnit> getOrganisationUnitsBetween( int first, int max );
+    
+    Collection<OrganisationUnit> getOrganisationUnitsBetweenByName( String name, int first, int max );
+    
     // -------------------------------------------------------------------------
     // OrganisationUnitHierarchy
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2011-11-25 15:12:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/DefaultOrganisationUnitService.java	2011-12-07 14:10:29 +0000
@@ -536,6 +536,16 @@
         } );
     }
     
+    public Collection<OrganisationUnit> getOrganisationUnitsBetween( int first, int max )
+    {
+        return organisationUnitStore.getBetween( first, max );
+    }
+
+    public Collection<OrganisationUnit> getOrganisationUnitsBetweenByName( String name, int first, int max )
+    {
+        return organisationUnitStore.getBetweenByName( name, first, max );
+    }
+    
     // -------------------------------------------------------------------------
     // OrganisationUnitHierarchy
     // -------------------------------------------------------------------------