=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java 2012-09-22 17:46:17 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java 2012-09-23 07:25:57 +0000 @@ -111,15 +111,6 @@ private Set optionCombosInExpression = new HashSet(); // ------------------------------------------------------------------------- - // Transient properties - // ------------------------------------------------------------------------- - - /** - * Set on-the-fly with exploded data element totals. - */ - private transient String explodedExpression; - - // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- @@ -302,14 +293,4 @@ { this.nullIfBlank = nullIfBlank; } - - public String getExplodedExpression() - { - return explodedExpression; - } - - public void setExplodedExpression( String explodedExpression ) - { - this.explodedExpression = explodedExpression; - } } === 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 2012-09-22 21:59:39 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.java 2012-09-23 07:25:57 +0000 @@ -35,7 +35,6 @@ import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.dataelement.DataElementOperand; import org.hisp.dhis.indicator.Indicator; -import org.hisp.dhis.validation.ValidationRule; /** * Interface for ExpressionService. Defines service functionality for @@ -64,7 +63,6 @@ final String OPERAND_EXPRESSION = "\\[\\d+?.*?\\]"; final String DAYS_EXPRESSION = "[days]"; final String CONSTANT_EXPRESSION = "\\[C(\\d+?)\\]"; - final String COMPULSORY_PAIR_EXPRESSION = "[Compulsory]"; /** * Adds a new Expression to the database. @@ -203,14 +201,6 @@ void explodeAndSubstituteExpressions( Collection indicators, Integer days ); /** - * Populates the explodedExpression property on the Expression objects of all - * ValidationRules in the given collection. - * - * @param validationRules the collection of ValidationRules. - */ - void explodeExpressions( Collection validationRules ); - - /** * Replaces references to data element totals with references to all * category option combos in the category combo for that data element. * === 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 2012-09-22 17:46:17 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/DefaultExpressionService.java 2012-09-23 07:25:57 +0000 @@ -55,7 +55,6 @@ import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.indicator.Indicator; import org.hisp.dhis.system.util.MathUtils; -import org.hisp.dhis.validation.ValidationRule; import org.springframework.transaction.annotation.Transactional; /** @@ -454,19 +453,7 @@ } } } - - public void explodeExpressions( Collection validationRules ) - { - if ( validationRules != null && !validationRules.isEmpty() ) - { - for ( ValidationRule rule : validationRules ) - { - rule.getLeftSide().setExplodedExpression( explodeExpression( rule.getLeftSide().getExpression() ) ); - rule.getRightSide().setExplodedExpression( explodeExpression( rule.getRightSide().getExpression() ) ); - } - } - } - + private String explodeExpression( String expression, Map> dataElementMap ) { StringBuffer buffer = null;