← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2566: Minor Bug Fixed in DeTarget Services

 

------------------------------------------------------------
revno: 2566
committer: Mithilesh Kumar Thakur<mithilesh.hisp@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2011-01-14 17:19:59 +0530
message:
  Minor Bug Fixed in DeTarget Services
modified:
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java
  local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.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 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java	2011-01-14 08:56:27 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/DefaultDeTargetService.java	2011-01-14 11:49:59 +0000
@@ -90,7 +90,7 @@
         return deTargetStore.getDeTargetsBySource( source );
     }
     
-    public Collection<DeTarget> getDeTargetsByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+    public Collection<DeTargetMember> getDeTargetsByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
     {
         return deTargetStore.getDeTargetsByDataElementAndCategoryOptionCombo( dataelement, deoptioncombo );
     }
@@ -109,9 +109,9 @@
         return deTargetStore.getDeTargetMembers( deTarget );
     }
     
-    public int addDeTargetMember( DeTargetMember  deTargetMember )
+    public void addDeTargetMember( DeTargetMember  deTargetMember )
     {
-        return deTargetStore.addDeTargetMember( deTargetMember );
+        deTargetStore.addDeTargetMember( deTargetMember );
     }
     
     

=== modified file 'local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java'
--- local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java	2011-01-14 08:56:27 +0000
+++ local/in/dhis-in-services/dhis-in-service-survey/src/main/java/org/hisp/dhis/detarget/hibernate/HibernateDeTargetStore.java	2011-01-14 11:49:59 +0000
@@ -146,11 +146,11 @@
    }
    @SuppressWarnings( "unchecked" )
    
-   public Collection<DeTarget> getDeTargetsByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
+   public Collection<DeTargetMember> getDeTargetsByDataElementAndCategoryOptionCombo( DataElement dataelement ,DataElementCategoryOptionCombo deoptioncombo )
    {
        Session session = sessionFactory.getCurrentSession();
 
-       Criteria criteria = session.createCriteria( DeTarget.class );
+       Criteria criteria = session.createCriteria( DeTargetMember.class );
        criteria.createAlias( "dataelements", "i" );
        criteria.createAlias( "decategoryOptionCombo", "j" );
        criteria.add( Restrictions.eq( "i.id", dataelement.getId() ) );
@@ -171,11 +171,11 @@
    // DeTargetMember
    // -------------------------------------------------------------------------
    
-   public int addDeTargetMember( DeTargetMember  deTargetMember )
+   public void addDeTargetMember( DeTargetMember  deTargetMember )
    {
        Session session = sessionFactory.getCurrentSession();
 
-       return (Integer) session.save( deTargetMember );
+       session.save( deTargetMember );
    }
    
    public void updateDeTargetMember( DeTargetMember deTargetMember )