=== 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-04-11 12:17:07 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2015-05-26 01:29:44 +0000 @@ -49,6 +49,7 @@ 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; @@ -130,6 +131,8 @@ private Set dataSets = new HashSet<>(); + private Set programs = new HashSet<>(); + private Set users = new HashSet<>(); /** @@ -1025,6 +1028,21 @@ @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 getPrograms() + { + return programs; + } + + public void setPrograms( Set 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 getUsers() @@ -1136,6 +1154,7 @@ 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-04-03 07:05:42 +0000 +++ 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 @@ -1,9 +1,9 @@ ] - > + "-//Hibernate/Hibernate Mapping DTD 3.0//EN" + "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" + [] + > @@ -26,9 +26,9 @@ + foreign-key="fk_parentid" index="in_parentid" /> - + @@ -50,6 +50,12 @@ + + + + + +