← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2286: Renamed some methods in operand

 

------------------------------------------------------------
revno: 2286
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2010-12-05 20:34:52 +0100
message:
  Renamed some methods in operand
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java
  dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/DefaultCrossTabService.java
  dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/jdbc/JDBCCrossTabStore.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/compulsoryDataElementsForm.vm


--
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/DataElementOperand.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java	2010-12-05 19:09:58 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementOperand.java	2010-12-05 19:34:52 +0000
@@ -178,18 +178,6 @@
     }
 
     /**
-     * Returns a name based on the DataElement and the
-     * DataElementCategoryOptionCombo.
-     * 
-     * @return the name.
-     */
-    //TODO remove?
-    public String getPersistedName()
-    {
-        return dataElement.getName() + SPACE + categoryOptionCombo.getName();
-    }
-
-    /**
      * Returns an id based on the DataElement and the
      * DataElementCategoryOptionCombo.
      * 
@@ -205,8 +193,7 @@
      * 
      * @return the name.
      */
-    //TODO rename
-    public String getSimpleName()
+    public String getColumnName()
     {
         return COLUMN_PREFIX + dataElementId + COLUMN_SEPARATOR + optionComboId;
     }
@@ -240,7 +227,8 @@
     }
 
     /**
-     * Updates all transient 
+     * Updates all transient properties.
+     * 
      * @param dataElement
      * @param categoryOptionCombo
      */

=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/DefaultCrossTabService.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/DefaultCrossTabService.java	2010-11-29 17:28:55 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/DefaultCrossTabService.java	2010-12-05 19:34:52 +0000
@@ -197,7 +197,7 @@
 
         for ( DataElementOperand operand : operands )
         {
-            final String col = operand.getSimpleName();
+            final String col = operand.getColumnName();
 
             if ( columnNameIndexMap.containsKey( col ) )
             {

=== modified file 'dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/jdbc/JDBCCrossTabStore.java'
--- dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/jdbc/JDBCCrossTabStore.java	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-datamart-default/src/main/java/org/hisp/dhis/datamart/crosstab/jdbc/JDBCCrossTabStore.java	2010-12-05 19:34:52 +0000
@@ -86,7 +86,7 @@
             
             for ( DataElementOperand operand : operands )
             {
-                sql.append( operand.getSimpleName() ).append( " VARCHAR(30), " );
+                sql.append( operand.getColumnName() ).append( " VARCHAR(30), " );
             }
             
             sql.append( "PRIMARY KEY ( periodid, sourceid ) );" );
@@ -206,7 +206,7 @@
             
             for ( final DataElementOperand operand : operands )
             {
-                buffer.append( operand.getSimpleName() ).append( ", " );
+                buffer.append( operand.getColumnName() ).append( ", " );
             }
             
             if ( buffer.length() > 1 )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/compulsoryDataElementsForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/compulsoryDataElementsForm.vm	2010-09-21 06:16:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/compulsoryDataElementsForm.vm	2010-12-05 19:34:52 +0000
@@ -35,7 +35,7 @@
         <td>
             <select id="selectedOperands" name="selectedOperands" size="15" style="width:325px" multiple="multiple" ondblclick="moveSelectedById( 'selectedOperands', 'availableOperands' )">
             #foreach( $operand in $selectedOperands )
-                <option value="${operand.persistedId}">$encoder.htmlEncode( $!operand.persistedName )</option>
+                <option value="${operand.persistedId}">$encoder.htmlEncode( $!operand.getPrettyName() )</option>
             #end
             </select>
         </td>