dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30897
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15709: Fixed mapping issues with EventChart
------------------------------------------------------------
revno: 15709
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-06-17 08:38:01 +0200
message:
Fixed mapping issues with EventChart
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java
dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml
--
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/eventchart/EventChart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java 2014-06-16 16:20:38 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/eventchart/EventChart.java 2014-06-17 06:38:01 +0000
@@ -96,18 +96,18 @@
private Date endDate;
+ private String dataType;
+
+ private List<String> filterDimensions = new ArrayList<String>();
+
private String domainAxisLabel;
private String rangeAxisLabel;
- private String type;
-
private String series;
private String category;
- private List<String> filterDimensions = new ArrayList<String>();
-
private String countType;
private boolean hideLegend;
@@ -291,9 +291,9 @@
this.filterDimensions.add( filter );
}
- public boolean isType( String type )
+ public boolean isDataType( String dataType )
{
- return this.type != null && this.type.equalsIgnoreCase( type );
+ return this.dataType != null && this.dataType.equalsIgnoreCase( dataType );
}
public boolean isTargetLine()
@@ -377,6 +377,19 @@
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
+ public String getDataType()
+ {
+ return dataType;
+ }
+
+ public void setDataType( String dataType )
+ {
+ this.dataType = dataType;
+ }
+
+ @JsonProperty
+ @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getDomainAxisLabel()
{
return domainAxisLabel;
@@ -401,19 +414,6 @@
}
@JsonProperty
- @JsonView( { DetailedView.class, ExportView.class, DimensionalView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
- public String getType()
- {
- return type;
- }
-
- public void setType( String type )
- {
- this.type = type;
- }
-
- @JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public String getSeries()
@@ -722,7 +722,7 @@
domainAxisLabel = eventChart.getDomainAxisLabel();
rangeAxisLabel = eventChart.getRangeAxisLabel();
countType = eventChart.getCountType();
- type = eventChart.getType();
+ dataType = eventChart.getDataType();
series = eventChart.getSeries();
category = eventChart.getCategory();
hideLegend = eventChart.isHideLegend();
=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml 2014-06-16 16:20:38 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/org/hisp/dhis/eventchart/EventChart.hbm.xml 2014-06-17 06:38:01 +0000
@@ -97,20 +97,6 @@
<property name="dataType" not-null="true" />
- <list name="columnDimensions" table="eventchart_columns">
- <cache usage="read-write" />
- <key column="eventchartid" foreign-key="fk_eventchart_columns_eventchartid" />
- <list-index column="sort_order" base="0" />
- <element type="string" column="dimension" />
- </list>
-
- <list name="rowDimensions" table="eventchart_rows">
- <cache usage="read-write" />
- <key column="eventchartid" foreign-key="fk_eventchart_rows_eventchartid" />
- <list-index column="sort_order" base="0" />
- <element type="string" column="dimension" />
- </list>
-
<list name="filterDimensions" table="eventchart_filters">
<cache usage="read-write" />
<key column="eventchartid" foreign-key="fk_eventchart_filters_eventchartid" />
@@ -118,8 +104,6 @@
<element type="string" column="dimension" />
</list>
- <property name="hideEmptyRows" />
-
<property name="countType" />
<property name="sortOrder" />