← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1063: Renamed a few methods

 

------------------------------------------------------------
revno: 1063
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-11-20 08:45:12 +0100
message:
  Renamed a few methods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.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/patient/PatientIdentifierStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2009-10-08 10:21:16 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2009-11-20 07:45:12 +0000
@@ -47,7 +47,7 @@
 
     Collection<PatientIdentifier> getByIdentifier( String identifier );
     
-    Collection<PatientIdentifier> getPatientIdentifiersByType( PatientIdentifierType identifierType );
+    Collection<PatientIdentifier> getByType( PatientIdentifierType identifierType );
 
     Collection<PatientIdentifier> getByOrganisationUnit( OrganisationUnit organisationUnit );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2009-10-28 19:47:26 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2009-11-20 07:45:12 +0000
@@ -39,7 +39,7 @@
 {
     String ID = ProgramStageInstanceStore.class.getName();   
     
-    ProgramStageInstance getProgramStageInstance( ProgramInstance programInstance, ProgramStage programStage );   
+    ProgramStageInstance get( ProgramInstance programInstance, ProgramStage programStage );   
     
     Collection<ProgramStageInstance> get( ProgramStage programStage );   
     

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java	2009-11-12 11:27:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java	2009-11-20 07:45:12 +0000
@@ -41,13 +41,11 @@
 
     String ID = RelationshipStore.class.getName();
 
-    Relationship getRelationship( Patient patientA, Patient patientB, RelationshipType relationshipType );
-
-    // For example a patient might have more than one sibling
-    Collection<Relationship> getRelationships( Patient patientA, RelationshipType relationshipType );
-
-    Collection<Relationship> getRelationshipsForPatient( Patient patient );
-
-    Collection<Relationship> getRelationshipsByRelationshipType( RelationshipType relationshipType );   
-
+    Relationship get( Patient patientA, Patient patientB, RelationshipType relationshipType );
+
+    Collection<Relationship> get( Patient patientA, RelationshipType relationshipType );
+
+    Collection<Relationship> getForPatient( Patient patient );
+
+    Collection<Relationship> getByRelationshipType( RelationshipType relationshipType );   
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java	2009-10-08 10:21:16 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java	2009-11-20 07:45:12 +0000
@@ -76,7 +76,7 @@
     
     public Collection<PatientIdentifier> getPatientIdentifiersByType( PatientIdentifierType identifierType )
     {
-        return patientIdentifierStore.getPatientIdentifiersByType( identifierType );
+        return patientIdentifierStore.getByType( identifierType );
     }
 
     public Collection<PatientIdentifier> getPatientIdentifiersByIdentifier( String identifier )

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java	2009-10-08 10:21:16 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java	2009-11-20 07:45:12 +0000
@@ -71,7 +71,7 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<PatientIdentifier> getPatientIdentifiersByType( PatientIdentifierType identifierType )
+    public Collection<PatientIdentifier> getByType( PatientIdentifierType identifierType )
     {
         return getCriteria( Restrictions.eq( "identifierType", identifierType ) ).list();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2009-11-12 16:47:23 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2009-11-20 07:45:12 +0000
@@ -80,7 +80,7 @@
 
     public ProgramStageInstance getProgramStageInstance( ProgramInstance programInstance, ProgramStage programStage )
     {
-        return programStageInstanceStore.getProgramStageInstance( programInstance, programStage );
+        return programStageInstanceStore.get( programInstance, programStage );
     }
 
     public Collection<ProgramStageInstance> getProgramStageInstances( ProgramStage programStage )

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2009-10-29 11:05:34 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2009-11-20 07:45:12 +0000
@@ -44,7 +44,7 @@
     extends HibernateGenericStore<ProgramStageInstance>
     implements ProgramStageInstanceStore
 {    
-    public ProgramStageInstance getProgramStageInstance( ProgramInstance programInstance, ProgramStage programStage )
+    public ProgramStageInstance get( ProgramInstance programInstance, ProgramStage programStage )
     {
         return (ProgramStageInstance) getCriteria( Restrictions.eq( "programInstance", programInstance ),
             Restrictions.eq( "programStage", programStage ) ).uniqueResult();

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2009-11-12 11:27:02 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2009-11-20 07:45:12 +0000
@@ -72,7 +72,7 @@
 
     public Collection<Relationship> getRelationshipsForPatient( Patient patient )
     {
-        return relationshipStore.getRelationshipsForPatient( patient );
+        return relationshipStore.getForPatient( patient );
     }
 
     public int saveRelationship( Relationship relationship )
@@ -87,16 +87,16 @@
 
     public Collection<Relationship> getRelationshipsByRelationshipType( RelationshipType relationshipType )
     {
-        return relationshipStore.getRelationshipsByRelationshipType( relationshipType );
+        return relationshipStore.getByRelationshipType( relationshipType );
     }
 
     public Collection<Relationship> getRelationships( Patient patientA, RelationshipType relationshipType )
     {
-        return relationshipStore.getRelationships( patientA, relationshipType );
+        return relationshipStore.get( patientA, relationshipType );
     }
 
     public Relationship getRelationship( Patient patientA, Patient patientB, RelationshipType relationshipType )
     {
-        return relationshipStore.getRelationship( patientA, patientB, relationshipType );
+        return relationshipStore.get( patientA, patientB, relationshipType );
     }    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java	2009-11-11 00:05:58 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java	2009-11-20 07:45:12 +0000
@@ -45,7 +45,7 @@
 {
 
     @SuppressWarnings( "unchecked" )
-    public Collection<Relationship> getRelationshipsForPatient( Patient patient )
+    public Collection<Relationship> getForPatient( Patient patient )
     {
         return getCriteria(
             Restrictions.disjunction().add( Restrictions.eq( "patientA", patient ) ).add(
@@ -53,19 +53,19 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<Relationship> getRelationshipsByRelationshipType( RelationshipType relationshipType )
+    public Collection<Relationship> getByRelationshipType( RelationshipType relationshipType )
     {
         return getCriteria( Restrictions.eq( "relationshipType", relationshipType ) ).list();
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<Relationship> getRelationships( Patient patientA, RelationshipType relationshipType )
+    public Collection<Relationship> get( Patient patientA, RelationshipType relationshipType )
     {
         return getCriteria( Restrictions.eq( "patientA", patientA ),
             Restrictions.eq( "relationshipType", relationshipType ) ).list();
     }
 
-    public Relationship getRelationship( Patient patientA, Patient patientB, RelationshipType relationshipType )
+    public Relationship get( Patient patientA, Patient patientB, RelationshipType relationshipType )
     {
         return (Relationship) getCriteria( Restrictions.eq( "patientA", patientA ),
             Restrictions.eq( "patientB", patientB ), Restrictions.eq( "relationshipType", relationshipType ) )