← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15306: Category deletion, allowing deletion of categories which are linked to option combos. No good rea...

 

------------------------------------------------------------
revno: 15306
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-05-19 17:28:18 +0200
message:
  Category deletion, allowing deletion of categories which are linked to option combos. No good reason to deny that.
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboDeletionHandler.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/dataelement/DataElementCategoryOptionComboDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboDeletionHandler.java	2014-05-19 15:19:17 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionComboDeletionHandler.java	2014-05-19 15:28:18 +0000
@@ -86,23 +86,6 @@
     }
     
     @Override
-    public String allowDeleteDataElementCategory( DataElementCategory category )
-    {
-        final String sql =
-            "select count(*) from datavalue dv " +
-            "where dv.categoryoptioncomboid in ( " +
-                "select cc.categoryoptioncomboid from categoryoptioncombos_categoryoptions cc " +
-                "join categories_categoryoptions co on cc.categoryoptionid=co.categoryoptionid " +
-                "where co.categoryid=" + category.getId() + " ) " +
-            "or dv.attributeoptioncomboid in ( " +
-                "select cc.categoryoptioncomboid from categoryoptioncombos_categoryoptions cc " +
-                "join categories_categoryoptions co on cc.categoryoptionid=co.categoryoptionid " +
-                "where co.categoryid=" + category.getId() + " );";
-
-        return jdbcTemplate.queryForObject( sql, Integer.class ) == 0 ? null : ERROR;
-    }
-    
-    @Override
     public String allowDeleteDataElementCategoryCombo( DataElementCategoryCombo categoryCombo )
     {
         final String sql =