← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20235: Minor revert

 

------------------------------------------------------------
revno: 20235
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-09-18 20:07:15 +0200
message:
  Minor revert
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.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/dataelement/DataElementCategoryOptionCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java	2015-09-18 17:50:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryOptionCombo.java	2015-09-18 18:07:15 +0000
@@ -32,7 +32,6 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -289,10 +288,6 @@
         return name != null && name.equals( DEFAULT_TOSTRING );
     }
 
-    /**
-     * Gets the name. Orders the options after the order of the category in
-     * category combo for which it is part of.
-     */
     @Override
     public String getName()
     {
@@ -300,31 +295,7 @@
         {
             return name;
         }
-        
-        StringBuilder builder = new StringBuilder();
-        
-        List<DataElementCategory> categories = this.categoryCombo.getCategories();
-        
-        for ( DataElementCategory category : categories )
-        {
-            builder.append( "(" );
-            
-            List<DataElementCategoryOption> options = category.getCategoryOptions();
-            
-            for ( DataElementCategoryOption option : this.categoryOptions )
-            {
-                if ( options.contains( option ) )
-                {
-                    builder.append( option.getDisplayName() ).append( ", " );
-                }
-            }
-            
-            builder.delete( Math.max( builder.length() - 2, 0 ), builder.length() ).append( ")" );
-        }
-        
-        return  builder.toString();
-        
-        /*
+
         StringBuilder name = new StringBuilder();
 
         if ( categoryOptions != null && categoryOptions.size() > 0 )
@@ -352,7 +323,6 @@
         }
 
         return name.toString();
-        */
     }
 
     @Override