← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5875: Fixed bug with map generation

 

Merge authors:
  Lars Helge Øverland (larshelge)
------------------------------------------------------------
revno: 5875 [merge]
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-02-07 14:01:26 +0100
message:
  Fixed bug with map generation
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.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/OrganisationUnitLevel.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitLevel.java	2012-02-07 12:05:35 +0000
@@ -104,6 +104,12 @@
         return level == other.level && name.equals( other.name );
     }
 
+    @Override
+    public String toString()
+    {
+        return "[Name: " + name + ", level: " + level + "]";
+    }
+
     // -------------------------------------------------------------------------
     // Getters and setters
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/PeriodService.java	2012-02-07 13:00:52 +0000
@@ -261,6 +261,14 @@
      */
     Collection<Period> namePeriods( Collection<Period> periods, I18nFormat format );
     
+    /**
+     * Checks if the given Period is associated with the current session. If not,
+     * replaces the Period with a Period associated with the current session.
+     * Persists the Period if not already persisted.
+     * 
+     * @param period the Period to reload.
+     * @return a Period.
+     */
     Period reloadPeriod( Period period );
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/DefaultPeriodService.java	2012-02-07 13:00:52 +0000
@@ -287,6 +287,6 @@
 
     public Period reloadPeriod( Period period )
     {
-        return periodStore.reloadPeriod( period );
+        return periodStore.reloadForceAddPeriod( period );
     }
 }