← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1681: Removed unused code

 

------------------------------------------------------------
revno: 1681
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2010-03-22 08:52:24 +0100
message:
  Removed unused code
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml


--
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/dataelement/DataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2010-03-19 13:36:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementService.java	2010-03-22 07:52:24 +0000
@@ -498,30 +498,5 @@
      * @param dataElements the DataElements.
      * @return a collection of all Operands.
      */
-    Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements );
-    
-    /**
-     * Adds a DataElementOperand.
-     * 
-     * @param operand the DataElementOperand.
-     * @return the generated identifier.
-     */
-    int addDataElementOperand( DataElementOperand operand );
-    
-    /**
-     * Returns the DataElementOperand representing the given DataElement and
-     * DataElementCategoryOptionCombo.
-     * 
-     * @param element the DataElement.
-     * @param categoryOptionCombo the DataElementCategoryOptionCombo.
-     * @return the DataElementOperand.
-     */
-    DataElementOperand getDataElementOperand( DataElement element, DataElementCategoryOptionCombo categoryOptionCombo );
-    
-    /**
-     * Deletes the given DataElementOperand.
-     * 
-     * @param operand the DataElementOperand.
-     */
-    void deleteDataElementOperand( DataElementOperand operand );
+    Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements );    
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java	2010-03-19 13:36:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementStore.java	2010-03-22 07:52:24 +0000
@@ -280,30 +280,5 @@
      * @param dataElements the DataElements.
      * @return a collection of all Operands.
      */
-    Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements );
-    
-    /**
-     * Adds a DataElementOperand.
-     * 
-     * @param operand the DataElementOperand.
-     * @return the generated identifier.
-     */
-    int addDataElementOperand( DataElementOperand operand );
-    
-    /**
-     * Returns the DataElementOperand representing the given DataElement and
-     * DataElementCategoryOptionCombo.
-     * 
-     * @param element the DataElement.
-     * @param categoryOptionCombo the DataElementCategoryOptionCombo.
-     * @return the DataElementOperand.
-     */
-    DataElementOperand getDataElementOperand( DataElement element, DataElementCategoryOptionCombo categoryOptionCombo );
-    
-    /**
-     * Deletes the given DataElementOperand.
-     * 
-     * @param operand the DataElementOperand.
-     */
-    void deleteDataElementOperand( DataElementOperand operand );
+    Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements );    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2010-03-19 13:36:48 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java	2010-03-22 07:52:24 +0000
@@ -621,20 +621,5 @@
     public Collection<DataElementOperand> getAllGeneratedOperands( Collection<DataElement> dataElements )
     {
         return dataElementStore.getAllGeneratedOperands( dataElements );
-    }
-    
-    public int addDataElementOperand( DataElementOperand operand )
-    {
-        return dataElementStore.addDataElementOperand( operand );
-    }
-    
-    public DataElementOperand getDataElementOperand( DataElement element, DataElementCategoryOptionCombo categoryOptionCombo )
-    {
-        return dataElementStore.getDataElementOperand( element, categoryOptionCombo );
-    }
-    
-    public void deleteDataElementOperand( DataElementOperand operand )
-    {
-        dataElementStore.deleteDataElementOperand( operand );
-    }
+    }    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2010-03-19 13:36:48 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java	2010-03-22 07:52:24 +0000
@@ -43,7 +43,6 @@
 import org.hisp.dhis.dataelement.CalculatedDataElement;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.dataelement.DataElementGroup;
 import org.hisp.dhis.dataelement.DataElementOperand;
 import org.hisp.dhis.dataelement.DataElementStore;
@@ -469,24 +468,4 @@
             throw new RuntimeException( "Failed to get all operands", ex );
         }   
     }
-    
-    public int addDataElementOperand( DataElementOperand operand )
-    {
-        return (Integer) sessionFactory.getCurrentSession().save( operand );
-    }
-    
-    public DataElementOperand getDataElementOperand( DataElement element, DataElementCategoryOptionCombo categoryOptionCombo )
-    {
-        Criteria criteria = sessionFactory.getCurrentSession().createCriteria( DataElementOperand.class );
-        
-        criteria.add( Restrictions.eq( "dataElement", element ) );
-        criteria.add( Restrictions.eq( "categoryOptionCombo", categoryOptionCombo ) );
-        
-        return (DataElementOperand) criteria.uniqueResult();
-    }
-    
-    public void deleteDataElementOperand( DataElementOperand operand )
-    {
-        sessionFactory.getCurrentSession().delete( operand );
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml	2010-03-20 18:00:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml	2010-03-22 07:52:24 +0000
@@ -15,6 +15,6 @@
 	
 	<many-to-one name="categoryOptionCombo" class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"
 		column="categoryoptioncomboid" foreign-key="fk_dataelementoperand_dataelementcategoryoptioncombo"/>
- 
+
   </class>
 </hibernate-mapping>
\ No newline at end of file