← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3515: Minor fix

 

------------------------------------------------------------
revno: 3515
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-05 23:23:51 +0200
message:
  Minor fix
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.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-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java	2011-04-22 18:56:19 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementDeletionHandler.java	2011-05-05 21:23:51 +0000
@@ -28,6 +28,7 @@
  */
 
 import org.hisp.dhis.dataelement.DataElement;
+import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.system.deletion.DeletionHandler;
 
@@ -82,4 +83,16 @@
             }
         }
     }
+    
+    @Override
+    public void deleteDataElementCategoryOptionCombo( DataElementCategoryOptionCombo categoryOptionCombo )
+    {
+        for ( MinMaxDataElement element : minMaxDataElementService.getAllMinMaxDataElements() )
+        {
+            if ( element.getOptionCombo().equals( categoryOptionCombo ) )
+            {
+                minMaxDataElementService.deleteMinMaxDataElement( element );
+            }
+        }
+    }
 }