← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 876: Excluded the 'default' dimension from DataValue.getDimensions method. Made DataElementGroup and I...

 

------------------------------------------------------------
revno: 876
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-10-16 21:36:39 +0200
message:
  Excluded the 'default' dimension from DataValue.getDimensions method. Made DataElementGroup and IndicatorGroup implement DimensionOption.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.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/dataelement/DataElementGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java	2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementGroup.java	2009-10-16 19:36:39 +0000
@@ -27,10 +27,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.common.DimensionOption;
 import org.hisp.dhis.common.IdentifiableObject;
 
 /**
@@ -39,7 +39,7 @@
  */
 public class DataElementGroup
     extends IdentifiableObject
-    implements Serializable
+    implements DimensionOption
 {
 
     /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java	2009-10-16 15:31:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/datavalue/DataValue.java	2009-10-16 19:36:39 +0000
@@ -152,9 +152,12 @@
         dimensions.put( Period.DIMENSION, period );
         dimensions.put( Source.DIMENSION, source );
         
-        for ( DataElementCategoryOption categoryOption : optionCombo.getCategoryOptions() )
+        if ( !optionCombo.isDefault() )
         {
-            dimensions.put( categoryOption.getCategory(), categoryOption );
+            for ( DataElementCategoryOption categoryOption : optionCombo.getCategoryOptions() )
+            {
+                dimensions.put( categoryOption.getCategory(), categoryOption );
+            }
         }
         
         return dimensions;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java	2009-10-05 16:07:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java	2009-10-16 19:36:39 +0000
@@ -27,10 +27,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.hisp.dhis.common.DimensionOption;
 import org.hisp.dhis.common.IdentifiableObject;
 
 /**
@@ -39,7 +39,7 @@
  */
 public class IndicatorGroup
     extends IdentifiableObject     
-    implements Serializable 
+    implements DimensionOption 
 {
 
     private Set<Indicator> members = new HashSet<Indicator>();