dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19102
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8202: Minor revert
------------------------------------------------------------
revno: 8202
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-09-23 09:25:57 +0200
message:
Minor revert
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/ExpressionService.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/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<DataElementCategoryOptionCombo> optionCombosInExpression = new HashSet<DataElementCategoryOptionCombo>();
// -------------------------------------------------------------------------
- // 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<Indicator> 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<ValidationRule> 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<ValidationRule> 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<Integer, Set<Integer>> dataElementMap )
{
StringBuffer buffer = null;