← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19183: Reverted R 19179.

 

------------------------------------------------------------
revno: 19183
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-05-25 23:06:44 -0400
message:
  Reverted R 19179.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.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/organisationunit/OrganisationUnit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-05-26 01:29:44 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java	2015-05-26 03:06:44 +0000
@@ -49,7 +49,6 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataset.DataSet;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.program.Program;
 import org.hisp.dhis.schema.PropertyType;
 import org.hisp.dhis.schema.annotation.Property;
 import org.hisp.dhis.schema.annotation.PropertyRange;
@@ -131,8 +130,6 @@
 
     private Set<DataSet> dataSets = new HashSet<>();
 
-    private Set<Program> programs = new HashSet<>();
-
     private Set<User> users = new HashSet<>();
 
     /**
@@ -1028,21 +1025,6 @@
     @JsonProperty
     @JsonSerialize( contentAs = BaseIdentifiableObject.class )
     @JsonView( { DetailedView.class } )
-    @JacksonXmlElementWrapper( localName = "programs", namespace = DxfNamespaces.DXF_2_0 )
-    @JacksonXmlProperty( localName = "program", namespace = DxfNamespaces.DXF_2_0 )
-    public Set<Program> getPrograms()
-    {
-        return programs;
-    }
-
-    public void setPrograms( Set<Program> programs )
-    {
-        this.programs = programs;
-    }
-
-    @JsonProperty
-    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
-    @JsonView( { DetailedView.class } )
     @JacksonXmlElementWrapper( localName = "users", namespace = DxfNamespaces.DXF_2_0 )
     @JacksonXmlProperty( localName = "userItem", namespace = DxfNamespaces.DXF_2_0 )
     public Set<User> getUsers()
@@ -1154,7 +1136,6 @@
             groups.clear();
             users.clear();
             dataSets.clear();
-            programs.clear();
 
             attributeValues.clear();
             attributeValues.addAll( organisationUnit.getAttributeValues() );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2015-05-26 01:29:44 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/organisationunit/hibernate/OrganisationUnit.hbm.xml	2015-05-26 03:06:44 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
-  "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-  "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
-  [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
-  >
+    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd";
+    [<!ENTITY identifiableProperties SYSTEM "classpath://org/hisp/dhis/common/identifiableProperties.hbm">]
+    >
 
 <hibernate-mapping>
   <class name="org.hisp.dhis.organisationunit.OrganisationUnit" table="organisationunit">
@@ -26,9 +26,9 @@
     </set>
 
     <many-to-one name="parent" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="parentid"
-      foreign-key="fk_parentid" index="in_parentid" />
+        foreign-key="fk_parentid" index="in_parentid" />
 
-    <property name="uuid" unique="true" length="36" />
+    <property name="uuid" unique="true" length="36"/>
 
     <property name="description" type="text" />
 
@@ -50,12 +50,6 @@
       <many-to-many class="org.hisp.dhis.dataset.DataSet" column="datasetid" />
     </set>
 
-    <set name="programs" table="program_organisationunits" inverse="true">
-      <cache usage="read-write" />
-      <key column="organisationunitid" />
-      <many-to-many class="org.hisp.dhis.program.Program" column="programid" />
-    </set>
-
     <set name="groups" table="orgunitgroupmembers" inverse="true">
       <cache usage="read-write" />
       <key column="organisationunitid" />