dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15655
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5728: Chart, minor bugfix
------------------------------------------------------------
revno: 5728
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-01-13 17:42:43 +0100
message:
Chart, minor bugfix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.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/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2012-01-13 09:55:59 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2012-01-13 16:42:43 +0000
@@ -138,8 +138,6 @@
private transient OrganisationUnit organisationUnit;
- private transient List<OrganisationUnit> allOrganisationUnits = new ArrayList<OrganisationUnit>();
-
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -184,6 +182,18 @@
return filter().getName();
}
+ public List<OrganisationUnit> getAllOrganisationUnits()
+ {
+ if ( organisationUnit != null )
+ {
+ return Arrays.asList( organisationUnit );
+ }
+ else
+ {
+ return organisationUnits;
+ }
+ }
+
private List<NameableObject> dimensionToList( String dimension )
{
List<NameableObject> list = new ArrayList<NameableObject>();
@@ -201,14 +211,7 @@
}
else if ( DIMENSION_ORGANISATIONUNIT.equals( dimension ) )
{
- if ( organisationUnit != null )
- {
- list.addAll( Arrays.asList( organisationUnit ) );
- }
- else
- {
- list.addAll( organisationUnits );
- }
+ list.addAll( getAllOrganisationUnits() );
}
return list;
@@ -567,16 +570,6 @@
this.organisationUnit = organisationUnit;
}
- public List<OrganisationUnit> getAllOrganisationUnits()
- {
- return allOrganisationUnits;
- }
-
- public void setAllOrganisationUnits( List<OrganisationUnit> allOrganisationUnits )
- {
- this.allOrganisationUnits = allOrganisationUnits;
- }
-
@XmlElement
@JsonProperty
public User getUser()