← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 18880: Removed now unused methods

 

------------------------------------------------------------
revno: 18880
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-10 14:32:54 +0200
message:
  Removed now unused methods
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.java
  dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.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/expression/ExpressionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.java	2015-04-10 06:53:15 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.java	2015-04-10 12:32:54 +0000
@@ -296,40 +296,10 @@
     /**
      * Substitutes potential constant and days in the numerator and denominator
      * on all indicators in the given collection.
-     *  
-     * Populates the explodedNumerator and explodedDenominator property on all
-     * indicators in the given collection. This method uses
-     * explodeExpression( String ) internally to generate the exploded expressions.
-     * Replaces references to data element totals with references to all
-     * category option combos in the category combo for that data element.
-     * 
-     * This method will perform better compared to calling explodeExpression( String )
-     * multiple times outside a transactional context as the transactional
-     * overhead is avoided.
-     * 
-     * @param indicators the collection of indicators.
-     * @param days the number of days in aggregation period.
-     */
-    void explodeAndSubstituteExpressions( Collection<Indicator> indicators, Integer days );
-
-    /**
-     * Substitutes potential constant and days in the numerator and denominator
-     * on all indicators in the given collection.
      */
     void substituteExpressions( Collection<Indicator> indicators, Integer days );
     
     /**
-     * Populates the explodedNumerator and explodedDenominator property on all
-     * indicators in the given collection. This method uses
-     * explodeExpression( String ) internally to generate the exploded expressions.
-     * Replaces references to data element totals with references to all
-     * category option combos in the category combo for that data element.
-     * 
-     * @param indicators the collection of indicators.
-     */    
-    void explodeExpressions( Collection<Indicator> indicators );
-    
-    /**
      * Populates the explodedExpression property on the Expression object of all
      * validation rules in the given collection. This method uses
      * explodeExpression( String ) internally to generate the exploded expressions.

=== modified file 'dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java'
--- dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-04-10 11:54:45 +0000
+++ dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/DefaultAnalyticsService.java	2015-04-10 12:32:54 +0000
@@ -285,22 +285,23 @@
         if ( params.getIndicators() != null )
         {
             int indicatorIndex = params.getIndicatorDimensionIndex();
+            
             List<Indicator> indicators = asTypedList( params.getIndicators() );
 
+            Period filterPeriod = params.getFilterPeriod();
+
+            Map<String, Double> constantMap = constantService.getConstantMap();
+
             // -----------------------------------------------------------------
             // Get indicator values
             // -----------------------------------------------------------------
 
-            Period filterPeriod = params.getFilterPeriod();
-
             Map<String, Map<String, Integer>> permutationOrgUnitTargetMap = getOrgUnitTargetMap( params, indicators );
 
             List<List<DimensionItem>> dimensionItemPermutations = params.getDimensionItemPermutations();
 
             Map<String, Map<DataElementOperand, Double>> permutationOperandValueMap = getPermutationOperandValueMap( params );
 
-            Map<String, Double> constantMap = constantService.getConstantMap();
-
             for ( Indicator indicator : indicators )
             {
                 for ( List<DimensionItem> dimensionItems : dimensionItemPermutations )

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java	2015-04-10 06:53:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java	2015-04-10 12:32:54 +0000
@@ -676,18 +676,6 @@
 
     @Override
     @Transactional
-    public void explodeAndSubstituteExpressions( Collection<Indicator> indicators, Integer days )
-    {
-        if ( indicators != null && !indicators.isEmpty() )
-        {
-            substituteExpressions( indicators, days );
-
-            explodeExpressions( indicators );
-        }
-    }
-
-    @Override
-    @Transactional
     public void substituteExpressions( Collection<Indicator> indicators, Integer days )
     {
         if ( indicators != null && !indicators.isEmpty() )
@@ -702,36 +690,6 @@
     
     @Override
     @Transactional
-    public void explodeExpressions( Collection<Indicator> indicators )
-    {
-        if ( indicators != null && !indicators.isEmpty() )
-        {
-            Set<String> dataElementTotals = new HashSet<>();
-            
-            for ( Indicator indicator : indicators )
-            {
-                dataElementTotals.addAll( getDataElementTotalUids( indicator.getNumerator() ) );
-                dataElementTotals.addAll( getDataElementTotalUids( indicator.getDenominator() ) );
-            }
-            
-            if ( !dataElementTotals.isEmpty() )
-            {
-                final ListMap<String, String> dataElementMap = dataElementService.getDataElementCategoryOptionComboMap( dataElementTotals );
-                
-                if ( !dataElementMap.isEmpty() )
-                {
-                    for ( Indicator indicator : indicators )
-                    {
-                        indicator.setExplodedNumerator( explodeExpression( indicator.getExplodedNumeratorFallback(), dataElementMap ) );
-                        indicator.setExplodedDenominator( explodeExpression( indicator.getExplodedDenominatorFallback(), dataElementMap ) );
-                    }
-                }
-            }
-        }
-    }
-
-    @Override
-    @Transactional
     public void explodeValidationRuleExpressions( Collection<ValidationRule> validationRules )
     {
         if ( validationRules != null && !validationRules.isEmpty() )