← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14263: minor rename

 

------------------------------------------------------------
revno: 14263
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-17 16:57:15 +0100
message:
  minor rename
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java
  dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/AddTrackedEntityInstanceAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SaveRelationshipAction.java
  dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/AddNewRalationshipAction.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/relationship/RelationshipService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java	2014-03-17 15:57:15 +0000
@@ -48,7 +48,7 @@
      * 
      * @return A generated unique id of the added {@link Program}.
      */
-    int saveRelationship( Relationship relationship );
+    int addRelationship( Relationship relationship );
 
     /**
      * Returns a {@link Program}.

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2014-03-17 15:56:48 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/trackedentity/AbstractTrackedEntityInstanceService.java	2014-03-17 15:57:15 +0000
@@ -377,7 +377,7 @@
             entityRelationship.setEntityInstanceB( entityInstanceB );
             entityRelationship.setRelationshipType( relationshipType );
 
-            relationshipService.saveRelationship( entityRelationship );
+            relationshipService.addRelationship( entityRelationship );
         }
     }
 

=== modified file 'dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java'
--- dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-02-10 11:32:58 +0000
+++ dhis-2/dhis-services/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/service/ActivityReportingServiceImpl.java	2014-03-17 15:57:15 +0000
@@ -1124,7 +1124,7 @@
             relationship.setEntityInstanceA( patientB );
             relationship.setEntityInstanceB( patientA );
         }
-        relationshipService.saveRelationship( relationship );
+        relationshipService.addRelationship( relationship );
         // return getPatientModel( orgUnitId, patientA );
         return getPatientModel( patientA );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2014-03-17 15:57:15 +0000
@@ -76,7 +76,7 @@
         return relationshipStore.getForTrackedEntityInstance( instance );
     }
 
-    public int saveRelationship( Relationship relationship )
+    public int addRelationship( Relationship relationship )
     {
         return relationshipStore.save( relationship );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-03-17 15:56:48 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-03-17 15:57:15 +0000
@@ -288,7 +288,7 @@
                     if ( relType != null )
                     {
                         rel.setRelationshipType( relType );
-                        relationshipService.saveRelationship( rel );
+                        relationshipService.addRelationship( rel );
                     }
                 }
             }
@@ -468,7 +468,7 @@
                     if ( relType != null )
                     {
                         rel.setRelationshipType( relType );
-                        relationshipService.saveRelationship( rel );
+                        relationshipService.addRelationship( rel );
                     }
                 }
             }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java	2014-03-17 13:36:52 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java	2014-03-17 15:57:15 +0000
@@ -107,8 +107,8 @@
     @Test
     public void testSaveRelationship()
     {
-        int idA = relationshipService.saveRelationship( relationshipA );
-        int idB = relationshipService.saveRelationship( relationshipB );
+        int idA = relationshipService.addRelationship( relationshipA );
+        int idB = relationshipService.addRelationship( relationshipB );
 
         assertNotNull( relationshipService.getRelationship( idA ) );
         assertNotNull( relationshipService.getRelationship( idB ) );
@@ -117,8 +117,8 @@
     @Test
     public void testDeleteRelationship()
     {
-        int idA = relationshipService.saveRelationship( relationshipA );
-        int idB = relationshipService.saveRelationship( relationshipB );
+        int idA = relationshipService.addRelationship( relationshipA );
+        int idB = relationshipService.addRelationship( relationshipB );
 
         assertNotNull( relationshipService.getRelationship( idA ) );
         assertNotNull( relationshipService.getRelationship( idB ) );
@@ -137,7 +137,7 @@
     @Test
     public void testUpdateRelationship()
     {
-        int idA = relationshipService.saveRelationship( relationshipA );
+        int idA = relationshipService.addRelationship( relationshipA );
 
         assertNotNull( relationshipService.getRelationship( idA ) );
 
@@ -150,8 +150,8 @@
     @Test
     public void testGetRelationshipById()
     {
-        int idA = relationshipService.saveRelationship( relationshipA );
-        int idB = relationshipService.saveRelationship( relationshipB );
+        int idA = relationshipService.addRelationship( relationshipA );
+        int idB = relationshipService.addRelationship( relationshipB );
 
         assertEquals( relationshipA, relationshipService.getRelationship( idA ) );
         assertEquals( relationshipB, relationshipService.getRelationship( idB ) );
@@ -160,8 +160,8 @@
     @Test
     public void testGetRelationshipByTypeEntityInstance()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipB );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipB );
 
         Relationship relationship = relationshipService.getRelationship( entityInstanceA, entityInstanceB,
             relationshipType );
@@ -174,8 +174,8 @@
     @Test
     public void testGetRelationshipByTwoEntityInstance()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipB );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipB );
 
         Relationship relationship = relationshipService.getRelationship( entityInstanceA, entityInstanceB );
         assertEquals( relationshipA, relationship );
@@ -187,8 +187,8 @@
     @Test
     public void testGetAllRelationships()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipB );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipB );
 
         assertTrue( equals( relationshipService.getAllRelationships(), relationshipA, relationshipB ) );
     }
@@ -196,8 +196,8 @@
     @Test
     public void testGetRelationshipsForEntityInstance()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipC );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipC );
 
         Collection<Relationship> relationships = relationshipService
             .getRelationshipsForTrackedEntityInstance( entityInstanceA );
@@ -207,8 +207,8 @@
     @Test
     public void testGetRelationships()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipC );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipC );
 
         Collection<Relationship> relationships = relationshipService.getRelationships( entityInstanceA,
             relationshipType );
@@ -218,8 +218,8 @@
     @Test
     public void testGetRelationshipsByRelationshipType()
     {
-        relationshipService.saveRelationship( relationshipA );
-        relationshipService.saveRelationship( relationshipC );
+        relationshipService.addRelationship( relationshipA );
+        relationshipService.addRelationship( relationshipC );
 
         Collection<Relationship> relationships = relationshipService
             .getRelationshipsByRelationshipType( relationshipType );

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/AddTrackedEntityInstanceAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/AddTrackedEntityInstanceAction.java	2014-03-10 18:36:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/AddTrackedEntityInstanceAction.java	2014-03-17 15:57:15 +0000
@@ -223,7 +223,7 @@
                 if ( relType != null )
                 {
                     rel.setRelationshipType( relType );
-                    relationshipService.saveRelationship( rel );
+                    relationshipService.addRelationship( rel );
                 }
             }
         }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SaveRelationshipAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SaveRelationshipAction.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/trackedentity/SaveRelationshipAction.java	2014-03-17 15:57:15 +0000
@@ -156,7 +156,7 @@
         }
 
         relationship.setRelationshipType( relationshipType );
-        relationshipService.saveRelationship( relationship );
+        relationshipService.addRelationship( relationship );
         
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/AddNewRalationshipAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/AddNewRalationshipAction.java	2014-02-07 20:25:49 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/namebaseddataentry/action/AddNewRalationshipAction.java	2014-03-17 15:57:15 +0000
@@ -139,7 +139,7 @@
             newRelationship.setEntityInstanceB( patientA );
         }
 
-        relationshipService.saveRelationship( newRelationship );
+        relationshipService.addRelationship( newRelationship );
 
         return REDIRECT;
     }