dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40920
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20849: minor fix, use .update and not .save for updateDataElementCategoryCombo
------------------------------------------------------------
revno: 20849
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-10-22 14:27:19 +0700
message:
minor fix, use .update and not .save for updateDataElementCategoryCombo
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/UpdateDataElementCategoryComboAction.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/dataelement/DataElementCategoryCombo.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2015-10-15 10:42:12 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataelement/DataElementCategoryCombo.java 2015-10-22 07:27:19 +0000
@@ -28,11 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonView;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import org.hisp.dhis.common.BaseIdentifiableObject;
import org.hisp.dhis.common.CombinationGenerator;
import org.hisp.dhis.common.DataDimensionType;
@@ -43,12 +44,10 @@
import org.hisp.dhis.common.view.DetailedView;
import org.hisp.dhis.common.view.ExportView;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonView;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
/**
* @author Abyot Aselefew
@@ -58,7 +57,7 @@
extends BaseIdentifiableObject
{
public static final String DEFAULT_CATEGORY_COMBO_NAME = "default";
-
+
/**
* A set with categories.
*/
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2015-10-12 10:12:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementCategoryService.java 2015-10-22 07:27:19 +0000
@@ -376,7 +376,7 @@
@Override
public void updateDataElementCategoryCombo( DataElementCategoryCombo dataElementCategoryCombo )
{
- categoryComboStore.save( dataElementCategoryCombo );
+ categoryComboStore.update( dataElementCategoryCombo );
}
@Override
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2015-09-23 12:23:52 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2015-10-22 07:27:19 +0000
@@ -14,9 +14,9 @@
<generator class="native" />
</id>
&identifiableProperties;
-
+
<property name="name" column="name" access="property" unique="false" not-null="false" length="255" />
-
+
<set name="categoryOptions" table="categoryoptioncombos_categoryoptions">
<cache usage="read-write" />
<key column="categoryoptioncomboid" foreign-key="fk_categoryoptioncombos_categoryoptions_categoryoptioncomboid" />
@@ -24,7 +24,7 @@
foreign-key="fk_categoryoptioncombo_categoryoptionid" />
</set>
- <property name="ignoreApproval" column="ignoreapproval" />
+ <property name="ignoreApproval" column="ignoreapproval" />
<join table="categorycombos_optioncombos">
<key column="categoryoptioncomboid" />
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/UpdateDataElementCategoryComboAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/UpdateDataElementCategoryComboAction.java 2015-10-15 10:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/categorycombo/UpdateDataElementCategoryComboAction.java 2015-10-22 07:27:19 +0000
@@ -79,7 +79,7 @@
{
this.code = code;
}
-
+
private boolean skipTotal;
public void setSkipTotal( boolean skipTotal )
@@ -120,7 +120,7 @@
dataElementCategoryService.updateDataElementCategoryCombo( categoryCombo );
dataElementCategoryService.updateOptionCombos( categoryCombo );
-
+
return SUCCESS;
}
}