dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37012
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18937: Added serialized helper get methods to data element and attribute which indicates whether an opti...
------------------------------------------------------------
revno: 18937
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-17 14:41:18 +0200
message:
Added serialized helper get methods to data element and attribute which indicates whether an option set is present
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.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/DataElement.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-03-19 12:24:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElement.java 2015-04-17 12:41:18 +0000
@@ -515,6 +515,17 @@
{
return legendSet != null;
}
+
+ // -------------------------------------------------------------------------
+ // Helper getters
+ // -------------------------------------------------------------------------
+
+ @JsonProperty
+ @JsonView( { DetailedView.class } )
+ public boolean isOptionSetValue()
+ {
+ return optionSet != null;
+ }
// -------------------------------------------------------------------------
// Getters and setters
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java 2015-04-08 04:43:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttribute.java 2015-04-17 12:41:18 +0000
@@ -169,6 +169,17 @@
}
// -------------------------------------------------------------------------
+ // Helper getters
+ // -------------------------------------------------------------------------
+
+ @JsonProperty
+ @JsonView( { DetailedView.class } )
+ public boolean isOptionSetValue()
+ {
+ return optionSet != null;
+ }
+
+ // -------------------------------------------------------------------------
// Getters and setters
// -------------------------------------------------------------------------