dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41391
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21082: Made ProgramTrackedEntityAttribute extend BaseDimensionalObject
------------------------------------------------------------
revno: 21082
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-11-17 11:14:31 +0100
message:
Made ProgramTrackedEntityAttribute extend BaseDimensionalObject
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.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/program/ProgramTrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2015-11-16 22:52:04 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java 2015-11-17 10:14:31 +0000
@@ -34,10 +34,15 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.google.common.base.MoreObjects;
+
+import org.hisp.dhis.analytics.AggregationType;
+import org.hisp.dhis.common.BaseDimensionalObject;
import org.hisp.dhis.common.BaseIdentifiableObject;
+import org.hisp.dhis.common.DimensionType;
import org.hisp.dhis.common.DxfNamespaces;
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
+import org.hisp.dhis.legend.LegendSet;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
/**
@@ -45,7 +50,7 @@
*/
@JacksonXmlRootElement( localName = "programTrackedEntityAttribute", namespace = DxfNamespaces.DXF_2_0 )
public class ProgramTrackedEntityAttribute
- extends BaseIdentifiableObject
+ extends BaseDimensionalObject
{
private Program program;
@@ -92,6 +97,28 @@
}
// -------------------------------------------------------------------------
+ // DimensionalObject
+ // -------------------------------------------------------------------------
+
+ @Override
+ public DimensionType getDimensionType()
+ {
+ return DimensionType.PROGRAM_ATTRIBUTE;
+ }
+
+ @Override
+ public LegendSet getLegendSet()
+ {
+ return attribute.getLegendSet();
+ }
+
+ @Override
+ public AggregationType getAggregationType()
+ {
+ return attribute.getAggregationType();
+ }
+
+ // -------------------------------------------------------------------------
// Getters && Setters
// -------------------------------------------------------------------------