← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15749: minor fix in DataElementOperand

 

------------------------------------------------------------
revno: 15749
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-06-18 15:40:28 +0200
message:
  minor fix in DataElementOperand
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.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/DataElementOperand.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java	2014-06-18 10:07:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java	2014-06-18 13:40:28 +0000
@@ -364,6 +364,8 @@
      */
     public void updateProperties( DataElement dataElement, DataElementCategoryOptionCombo categoryOptionCombo )
     {
+        this.dataElement = dataElement;
+        this.categoryOptionCombo = categoryOptionCombo;
         this.dataElementId = dataElement.getUid();
         this.optionComboId = categoryOptionCombo.getUid();
         this.operandId = dataElementId + SEPARATOR + optionComboId;
@@ -384,6 +386,7 @@
      */
     public void updateProperties( DataElement dataElement )
     {
+        this.dataElement = dataElement;
         this.dataElementId = dataElement.getUid();
         this.operandId = String.valueOf( dataElementId );
         this.operandName = getPrettyName( dataElement, null );
@@ -447,6 +450,8 @@
         this.categoryOptionCombo = categoryOptionCombo;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getDataElementId()
     {
         return dataElementId;
@@ -457,6 +462,8 @@
         this.dataElementId = dataElementId;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getOptionComboId()
     {
         return optionComboId;
@@ -467,6 +474,8 @@
         this.optionComboId = optionComboId;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getOperandId()
     {
         return operandId;
@@ -477,6 +486,8 @@
         this.operandId = operandId;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getOperandName()
     {
         return operandName;
@@ -487,6 +498,8 @@
         this.operandName = operandName;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getValueType()
     {
         return valueType;
@@ -497,6 +510,8 @@
         this.valueType = valueType;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getAggregationOperator()
     {
         return aggregationOperator;
@@ -507,6 +522,8 @@
         this.aggregationOperator = aggregationOperator;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public List<Integer> getAggregationLevels()
     {
         return aggregationLevels;
@@ -517,6 +534,8 @@
         this.aggregationLevels = aggregationLevels;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public int getFrequencyOrder()
     {
         return frequencyOrder;
@@ -527,6 +546,8 @@
         this.frequencyOrder = frequencyOrder;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public String getOperandType()
     {
         return operandType;
@@ -537,6 +558,8 @@
         this.operandType = operandType;
     }
 
+    @JsonProperty
+    @JsonView( { DetailedView.class } )
     public boolean isHasAggregationLevels()
     {
         return hasAggregationLevels;