dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32370
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16522: Model change. Removed Expression.categoryOptionCombos association. Not valid now that we allow to...
------------------------------------------------------------
revno: 16522
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-08-26 12:51:19 +0200
message:
Model change. Removed Expression.categoryOptionCombos association. Not valid now that we allow totals (no option combo) in validation rules. Also not currently in use.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/ExpressionDeletionHandler.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionStoreTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleGroupStoreTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleStoreTest.java
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ValidationRuleImporter.java
dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/AddValidationRuleAction.java
dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/UpdateValidationRuleAction.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 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/expression/Expression.java 2014-08-26 10:51:19 +0000
@@ -108,12 +108,6 @@
@Scanned
private Set<DataElement> dataElementsInExpression = new HashSet<>();
- /**
- * A reference to the optionCombos in the Expression.
- */
- @Scanned
- private Set<DataElementCategoryOptionCombo> optionCombosInExpression = new HashSet<>();
-
// -------------------------------------------------------------------------
// Transient properties
// -------------------------------------------------------------------------
@@ -138,13 +132,11 @@
* @param description A description of the Expression.
* @param dataElementsInExpression A reference to the DataElements in the Expression.
*/
- public Expression( String expression, String description, Set<DataElement> dataElementsInExpression,
- Set<DataElementCategoryOptionCombo> optionCombosInExpression )
+ public Expression( String expression, String description, Set<DataElement> dataElementsInExpression )
{
this.expression = expression;
this.description = description;
this.dataElementsInExpression = dataElementsInExpression;
- this.optionCombosInExpression = optionCombosInExpression;
}
// -------------------------------------------------------------------------
@@ -230,7 +222,6 @@
", explodedExpression='" + explodedExpression + '\'' +
", description='" + description + '\'' +
", dataElementsInExpression=" + dataElementsInExpression.size() +
- ", optionCombosInExpression=" + optionCombosInExpression.size() +
'}';
}
@@ -276,21 +267,6 @@
this.dataElementsInExpression = dataElementsInExpression;
}
- @JsonProperty(value = "categoryOptionCombos")
- @JsonSerialize(contentAs = BaseIdentifiableObject.class)
- @JsonView({ DetailedView.class, ExportView.class })
- @JacksonXmlElementWrapper(localName = "categoryOptionCombos", namespace = DxfNamespaces.DXF_2_0)
- @JacksonXmlProperty(localName = "categoryOptionCombo", namespace = DxfNamespaces.DXF_2_0)
- public Set<DataElementCategoryOptionCombo> getOptionCombosInExpression()
- {
- return optionCombosInExpression;
- }
-
- public void setOptionCombosInExpression( Set<DataElementCategoryOptionCombo> optionCombosInExpression )
- {
- this.optionCombosInExpression = optionCombosInExpression;
- }
-
@JsonProperty
@JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
@@ -338,8 +314,5 @@
dataElementsInExpression = other.getDataElementsInExpression() == null ?
dataElementsInExpression : new HashSet<>( other.getDataElementsInExpression() );
-
- optionCombosInExpression = other.getOptionCombosInExpression() == null ?
- optionCombosInExpression : new HashSet<>( other.getOptionCombosInExpression() );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2014-08-26 10:51:19 +0000
@@ -576,6 +576,7 @@
// Supportive methods
//--------------------------------------------------------------------------
+ @SuppressWarnings("unchecked")
private <T extends IdentifiableObject> GenericIdentifiableObjectStore<IdentifiableObject> getIdentifiableObjectStore( Class<T> clazz )
{
initMaps();
@@ -595,6 +596,7 @@
return (GenericIdentifiableObjectStore<IdentifiableObject>) store;
}
+ @SuppressWarnings("unchecked")
private <T extends NameableObject> GenericNameableObjectStore<NameableObject> getNameableObjectStore( Class<T> clazz )
{
initMaps();
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/ExpressionDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/ExpressionDeletionHandler.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/expression/ExpressionDeletionHandler.java 2014-08-26 10:51:19 +0000
@@ -29,7 +29,6 @@
*/
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
import org.hisp.dhis.system.deletion.DeletionHandler;
/**
@@ -72,17 +71,4 @@
}
}
}
-
- @Override
- public void deleteDataElementCategoryOptionCombo( DataElementCategoryOptionCombo optionCombo )
- {
- for ( Expression expression : expressionService.getAllExpressions() )
- {
- if ( expression.getOptionCombosInExpression().remove( optionCombo ) )
- {
- expression.setExpression( "1" );
- expressionService.updateExpression( expression );
- }
- }
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2014-08-26 10:51:19 +0000
@@ -127,6 +127,7 @@
executeSql( "DROP TABLE dashboarditem_trackedentitytabularreports" );
executeSql( "DROP TABLE categoryoptioncombousergroupaccesses" );
executeSql( "DROP TABLE validationrulegroupuserrolestoalert" );
+ executeSql( "DROP TABLE expressionoptioncombo" );
executeSql( "ALTER TABLE categoryoptioncombo drop column userid" );
executeSql( "ALTER TABLE categoryoptioncombo drop column publicaccess" );
executeSql( "ALTER TABLE dataelementcategoryoption drop column categoryid" );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml 2012-07-26 11:14:41 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/expression/hibernate/Expression.hbm.xml 2014-08-26 10:51:19 +0000
@@ -24,11 +24,5 @@
<many-to-many class="org.hisp.dhis.dataelement.DataElement" column="dataelementid" foreign-key="fk_expression_dataelementid" />
</set>
- <set name="optionCombosInExpression" table="expressionoptioncombo">
- <key column="expressionid" foreign-key="fk_expressionoptioncombo_expressionid"/>
- <many-to-many class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"
- column="categoryoptioncomboid" foreign-key="fk_expression_categoryoptioncomboid"/>
- </set>
-
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionServiceTest.java 2014-08-26 10:51:19 +0000
@@ -425,7 +425,7 @@
@Test
public void testAddGetExpression()
{
- Expression expression = new Expression( expressionA, descriptionA, dataElements, optionCombos );
+ Expression expression = new Expression( expressionA, descriptionA, dataElements );
int id = expressionService.addExpression( expression );
@@ -439,7 +439,7 @@
@Test
public void testUpdateExpression()
{
- Expression expression = new Expression( expressionA, descriptionA, dataElements, optionCombos );
+ Expression expression = new Expression( expressionA, descriptionA, dataElements );
int id = expressionService.addExpression( expression );
@@ -462,8 +462,8 @@
@Test
public void testDeleteExpression()
{
- Expression exprA = new Expression( expressionA, descriptionA, dataElements, optionCombos );
- Expression exprB = new Expression( expressionB, descriptionB, dataElements, optionCombos );
+ Expression exprA = new Expression( expressionA, descriptionA, dataElements );
+ Expression exprB = new Expression( expressionB, descriptionB, dataElements );
int idA = expressionService.addExpression( exprA );
int idB = expressionService.addExpression( exprB );
@@ -485,8 +485,8 @@
@Test
public void testGetAllExpressions()
{
- Expression exprA = new Expression( expressionA, descriptionA, dataElements, optionCombos );
- Expression exprB = new Expression( expressionB, descriptionB, dataElements, optionCombos );
+ Expression exprA = new Expression( expressionA, descriptionA, dataElements );
+ Expression exprB = new Expression( expressionB, descriptionB, dataElements );
expressionService.addExpression( exprA );
expressionService.addExpression( exprB );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionStoreTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/expression/ExpressionStoreTest.java 2014-08-26 10:51:19 +0000
@@ -124,7 +124,7 @@
@Test
public void testAddGetExpression()
{
- Expression expr = new Expression( expressionA, descriptionA, dataElements, optionCombos );
+ Expression expr = new Expression( expressionA, descriptionA, dataElements );
int id = expressionStore.save( expr );
@@ -138,7 +138,7 @@
@Test
public void testUpdateExpression()
{
- Expression expr = new Expression( expressionA, descriptionA, dataElements, optionCombos );
+ Expression expr = new Expression( expressionA, descriptionA, dataElements );
int id = expressionStore.save( expr );
@@ -161,8 +161,8 @@
@Test
public void testDeleteExpression()
{
- Expression exprA = new Expression( expressionA, descriptionA, dataElements, optionCombos );
- Expression exprB = new Expression( expressionB, descriptionB, dataElements, optionCombos );
+ Expression exprA = new Expression( expressionA, descriptionA, dataElements );
+ Expression exprB = new Expression( expressionB, descriptionB, dataElements );
int idA = expressionStore.save( exprA );
int idB = expressionStore.save( exprB );
@@ -184,8 +184,8 @@
@Test
public void testGetAllExpressions()
{
- Expression exprA = new Expression( expressionA, descriptionA, dataElements, optionCombos );
- Expression exprB = new Expression( expressionB, descriptionB, dataElements, optionCombos );
+ Expression exprA = new Expression( expressionA, descriptionA, dataElements );
+ Expression exprB = new Expression( expressionB, descriptionB, dataElements );
expressionStore.save( exprA );
expressionStore.save( exprB );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleGroupStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleGroupStoreTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleGroupStoreTest.java 2014-08-26 10:51:19 +0000
@@ -120,8 +120,8 @@
optionCombos = new HashSet<>();
optionCombos.add( categoryOptionCombo );
- expressionA = new Expression( "expressionA", "descriptionA", dataElements, optionCombos );
- expressionB = new Expression( "expressionB", "descriptionB", dataElements, optionCombos );
+ expressionA = new Expression( "expressionA", "descriptionA", dataElements );
+ expressionB = new Expression( "expressionB", "descriptionB", dataElements );
expressionService.addExpression( expressionB );
expressionService.addExpression( expressionA );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleServiceTest.java 2014-08-26 10:51:19 +0000
@@ -281,16 +281,16 @@
optionCombos.add( optionCombo );
expressionA = new Expression( "#{" + dataElementA.getUid() + suffix + "} + #{" + dataElementB.getUid() + suffix + "}",
- "descriptionA", dataElementsA, optionCombos );
+ "descriptionA", dataElementsA );
expressionB = new Expression( "#{" + dataElementC.getUid() + suffix + "} - #{" + dataElementD.getUid() + suffix + "}",
- "descriptionB", dataElementsB , optionCombos);
- expressionC = new Expression( "#{" + dataElementB.getUid() + suffix + "} * 2", "descriptionC", dataElementsC, optionCombos );
- expressionD = new Expression( "#{" + dataElementB.getUid() + suffix + "}", "descriptionD", dataElementsC, optionCombos );
- expressionE = new Expression( "#{" + dataElementB.getUid() + suffix + "} * 1.5", "descriptionE", dataElementsC, optionCombos );
+ "descriptionB", dataElementsB );
+ expressionC = new Expression( "#{" + dataElementB.getUid() + suffix + "} * 2", "descriptionC", dataElementsC );
+ expressionD = new Expression( "#{" + dataElementB.getUid() + suffix + "}", "descriptionD", dataElementsC );
+ expressionE = new Expression( "#{" + dataElementB.getUid() + suffix + "} * 1.5", "descriptionE", dataElementsC );
expressionF = new Expression( "#{" + dataElementB.getUid() + suffix + "} / #{" + dataElementE.getUid() + suffix + "}",
- "descriptionF", dataElementsD, optionCombos );
+ "descriptionF", dataElementsD );
expressionG = new Expression( "#{" + dataElementB.getUid() + suffix + "} * 1.5 / #{" + dataElementE.getUid() + suffix + "}",
- "descriptionG", dataElementsD, optionCombos );
+ "descriptionG", dataElementsD );
expressionService.addExpression( expressionA );
expressionService.addExpression( expressionB );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleStoreTest.java'
--- dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleStoreTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/validation/ValidationRuleStoreTest.java 2014-08-26 10:51:19 +0000
@@ -115,8 +115,8 @@
optionCombos = new HashSet<>();
optionCombos.add( categoryOptionCombo );
- expressionA = new Expression( "expressionA", "descriptionA", dataElements, optionCombos );
- expressionB = new Expression( "expressionB", "descriptionB", dataElements, optionCombos );
+ expressionA = new Expression( "expressionA", "descriptionA", dataElements );
+ expressionB = new Expression( "expressionB", "descriptionB", dataElements );
expressionService.addExpression( expressionB );
expressionService.addExpression( expressionA );
@@ -246,9 +246,9 @@
dataElementsD.addAll( dataElementsA );
dataElementsD.addAll( dataElementsB );
- Expression expression1 = new Expression( "Expression1", "Expression1", dataElementsA, optionCombos );
- Expression expression2 = new Expression( "Expression2", "Expression2", dataElementsB, optionCombos );
- Expression expression3 = new Expression( "Expression3", "Expression3", dataElementsC, optionCombos );
+ Expression expression1 = new Expression( "Expression1", "Expression1", dataElementsA );
+ Expression expression2 = new Expression( "Expression2", "Expression2", dataElementsB );
+ Expression expression3 = new Expression( "Expression3", "Expression3", dataElementsC );
expressionService.addExpression( expression1 );
expressionService.addExpression( expression2 );
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/csv/DefaultCsvImportService.java 2014-08-26 10:51:19 +0000
@@ -261,14 +261,12 @@
leftSide.setDescription( getSafe( values, 10, null, 255 ) );
leftSide.setNullIfBlank( Boolean.valueOf( getSafe( values, 11, Boolean.FALSE.toString(), 5 ) ) );
leftSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( leftSide.getExpression() ) );
- leftSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( leftSide.getExpression() ) );
leftSide.setNullIfBlank( true );
rightSide.setExpression( getSafe( values, 12, null, 255 ) );
rightSide.setDescription( getSafe( values, 13, null, 255 ) );
rightSide.setNullIfBlank( Boolean.valueOf( getSafe( values, 14, Boolean.FALSE.toString(), 5 ) ) );
rightSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( rightSide.getExpression() ) );
- rightSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( rightSide.getExpression() ) );
rightSide.setNullIfBlank( true );
object.setLeftSide( leftSide );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java 2014-07-17 12:43:25 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dxf/converter/ValidationRuleConverter.java 2014-08-26 10:51:19 +0000
@@ -172,15 +172,11 @@
validationRule.getLeftSide().setDataElementsInExpression(
expressionService.getDataElementsInExpression( validationRule.getLeftSide().getExpression() ) );
- validationRule.getLeftSide().setOptionCombosInExpression(
- expressionService.getOptionCombosInExpression( validationRule.getLeftSide().getExpression() ) );
validationRule.getRightSide().setExpression( values.get( FIELD_RIGHTSIDE_EXPRESSION ) );
validationRule.getRightSide().setDescription( values.get( FIELD_RIGHTSIDE_DESCRIPTION ) );
validationRule.getRightSide().setDataElementsInExpression(
expressionService.getDataElementsInExpression( validationRule.getRightSide().getExpression() ) );
- validationRule.getRightSide().setOptionCombosInExpression(
- expressionService.getOptionCombosInExpression( validationRule.getRightSide().getExpression() ) );
validationRule.setPeriodType( PeriodType.getPeriodTypeByName( MonthlyPeriodType.NAME ) );
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ValidationRuleImporter.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ValidationRuleImporter.java 2014-07-17 13:01:11 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/importer/ValidationRuleImporter.java 2014-08-26 10:51:19 +0000
@@ -82,7 +82,6 @@
match.getRightSide().setExpression( object.getRightSide().getExpression() );
match.getRightSide().setDescription( object.getRightSide().getDescription() );
match.getRightSide().setDataElementsInExpression( object.getRightSide().getDataElementsInExpression() );
- match.getRightSide().setOptionCombosInExpression( object.getRightSide().getOptionCombosInExpression() );
expressionService.updateExpression( match.getLeftSide() );
expressionService.updateExpression( match.getRightSide() );
=== modified file 'dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java'
--- dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-support/dhis-support-test/src/main/java/org/hisp/dhis/DhisConvenienceTest.java 2014-08-26 10:51:19 +0000
@@ -1061,7 +1061,6 @@
expression.setExpression( expressionString );
expression.setDescription( "Description" + uniqueCharacter );
expression.setDataElementsInExpression( dataElementsInExpression );
- expression.setOptionCombosInExpression( optionCombosInExpression );
return expression;
}
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-08-15 07:02:10 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java 2014-08-26 10:51:19 +0000
@@ -430,8 +430,8 @@
@RequestMapping(value = "/{uid}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(value = HttpStatus.NO_CONTENT)
- public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable("uid") String uid ) throws
- Exception
+ public void deleteObject( HttpServletResponse response, HttpServletRequest request, @PathVariable("uid") String uid )
+ throws Exception
{
List<T> objects = getEntity( uid );
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/AddValidationRuleAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/AddValidationRuleAction.java 2014-07-17 12:43:25 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/AddValidationRuleAction.java 2014-08-26 10:51:19 +0000
@@ -215,7 +215,6 @@
leftSide.setDescription( leftSideDescription );
leftSide.setNullIfBlank( leftSideNullIfBlank );
leftSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( leftSideExpression ) );
- leftSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( leftSideExpression ) );
Expression rightSide = new Expression();
@@ -223,7 +222,6 @@
rightSide.setDescription( rightSideDescription );
rightSide.setNullIfBlank( rightSideNullIfBlank );
rightSide.setDataElementsInExpression( expressionService.getDataElementsInExpression( rightSideExpression ) );
- rightSide.setOptionCombosInExpression( expressionService.getOptionCombosInExpression( rightSideExpression ) );
ValidationRule validationRule = new ValidationRule();
=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/UpdateValidationRuleAction.java'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/UpdateValidationRuleAction.java 2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/java/org/hisp/dhis/validationrule/action/UpdateValidationRuleAction.java 2014-08-26 10:51:19 +0000
@@ -227,13 +227,11 @@
validationRule.getLeftSide().setDescription( leftSideDescription );
validationRule.getLeftSide().setNullIfBlank( leftSideNullIfBlank );
validationRule.getLeftSide().setDataElementsInExpression( expressionService.getDataElementsInExpression( leftSideExpression ) );
- validationRule.getLeftSide().setOptionCombosInExpression( expressionService.getOptionCombosInExpression( leftSideExpression ) );
validationRule.getRightSide().setExpression( rightSideExpression );
validationRule.getRightSide().setDescription( rightSideDescription );
validationRule.getRightSide().setNullIfBlank( rightSideNullIfBlank );
validationRule.getRightSide().setDataElementsInExpression( expressionService.getDataElementsInExpression( rightSideExpression ) );
- validationRule.getRightSide().setOptionCombosInExpression( expressionService.getOptionCombosInExpression( rightSideExpression ) );
validationRule.setOrganisationUnitLevel( organisationUnitLevel );
PeriodType periodType = periodService.getPeriodTypeByName( periodTypeName );