← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18764: minor fixes

 

------------------------------------------------------------
revno: 18764
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-03-31 13:22:06 +0700
message:
  minor fixes
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/Jackson2PropertyIntrospectorService.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/schema/Property.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2015-03-31 04:45:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/Property.java	2015-03-31 06:22:06 +0000
@@ -203,9 +203,9 @@
     private boolean manyToMany;
 
     /**
-     * Is property one-to-many.
+     * Is property one-to-one.
      */
-    private boolean oneToMany;
+    private boolean oneToOne;
 
     /**
      * Is property many-to-one.
@@ -580,14 +580,14 @@
 
     @JsonProperty
     @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
-    public boolean isOneToMany()
+    public boolean isOneToOne()
     {
-        return oneToMany;
+        return oneToOne;
     }
 
-    public void setOneToMany( boolean oneToMany )
+    public void setOneToOne( boolean oneToOne )
     {
-        this.oneToMany = oneToMany;
+        this.oneToOne = oneToOne;
     }
 
     @JsonProperty

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-03-31 04:45:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/AbstractPropertyIntrospectorService.java	2015-03-31 06:22:06 +0000
@@ -34,14 +34,14 @@
 import org.hibernate.engine.spi.SessionFactoryImplementor;
 import org.hibernate.mapping.Collection;
 import org.hibernate.mapping.Column;
-import org.hibernate.mapping.ManyToOne;
-import org.hibernate.mapping.OneToMany;
 import org.hibernate.mapping.PersistentClass;
 import org.hibernate.metadata.ClassMetadata;
 import org.hibernate.persister.collection.CollectionPersister;
 import org.hibernate.persister.entity.Joinable;
 import org.hibernate.type.AssociationType;
 import org.hibernate.type.CollectionType;
+import org.hibernate.type.ManyToOneType;
+import org.hibernate.type.OneToOneType;
 import org.hibernate.type.SingleColumnType;
 import org.hibernate.type.TextType;
 import org.hibernate.type.Type;
@@ -53,9 +53,6 @@
 import org.hisp.dhis.common.DimensionalObject;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.NameableObject;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
 import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
@@ -244,13 +241,13 @@
                 }
             }
 
-            if ( ManyToOne.class.isInstance( type ) )
+            if ( ManyToOneType.class.isInstance( type ) )
             {
                 property.setManyToOne( true );
             }
-            else if ( OneToMany.class.isInstance( type ) )
+            else if ( OneToOneType.class.isInstance( type ) )
             {
-                property.setOneToMany( true );
+                property.setOneToOne( true );
             }
 
             if ( SingleColumnType.class.isInstance( type ) )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/Jackson2PropertyIntrospectorService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/Jackson2PropertyIntrospectorService.java	2015-03-31 04:45:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/schema/Jackson2PropertyIntrospectorService.java	2015-03-31 06:22:06 +0000
@@ -124,7 +124,7 @@
                 property.setCascade( hibernateProperty.getCascade() );
                 property.setOwner( hibernateProperty.isOwner() );
                 property.setManyToMany( hibernateProperty.isManyToMany() );
-                property.setOneToMany( hibernateProperty.isOneToMany() );
+                property.setOneToOne( hibernateProperty.isOneToOne() );
                 property.setManyToOne( hibernateProperty.isManyToOne() );
                 property.setOwningRole( hibernateProperty.getOwningRole() );
                 property.setInverseRole( hibernateProperty.getInverseRole() );