dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28916
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14525: Removed transactional annotation from HibernateDataApprovalLevelStore (tx demarcation is at servi...
------------------------------------------------------------
revno: 14525
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-03-28 18:08:12 +0100
message:
Removed transactional annotation from HibernateDataApprovalLevelStore (tx demarcation is at service layer)
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalLevelStore.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/AddApprovalLevelAction.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-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-03-28 01:53:11 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/DefaultDataApprovalLevelService.java 2014-03-28 17:08:12 +0000
@@ -40,7 +40,7 @@
*/
@Transactional
public class DefaultDataApprovalLevelService
- implements DataApprovalLevelService
+ implements DataApprovalLevelService
{
// -------------------------------------------------------------------------
// Dependencies
@@ -169,9 +169,8 @@
dataApprovalLevels.add( index, newLevel );
- //
// Move down from end to here, to avoid duplicate level in database.
- //
+
for (int i = dataApprovalLevels.size() - 1; i > index; i-- )
{
update( dataApprovalLevels.get( i ), i );
@@ -197,9 +196,8 @@
dataApprovalLevels.remove( index );
- //
// Move up from here to end, to avoid duplicate level in database.
- //
+
for (int i = index; i < dataApprovalLevels.size(); i++ )
{
update( dataApprovalLevels.get( i ), i );
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalLevelStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalLevelStore.java 2014-03-28 10:13:01 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataapproval/hibernate/HibernateDataApprovalLevelStore.java 2014-03-28 17:08:12 +0000
@@ -34,15 +34,13 @@
import org.hisp.dhis.dataapproval.DataApprovalLevel;
import org.hisp.dhis.dataapproval.DataApprovalLevelStore;
import org.hisp.dhis.hibernate.HibernateGenericStore;
-import org.springframework.transaction.annotation.Transactional;
/**
* @author Jim Grace
*/
-@Transactional
public class HibernateDataApprovalLevelStore
- extends HibernateGenericStore<DataApprovalLevel>
- implements DataApprovalLevelStore
+ extends HibernateGenericStore<DataApprovalLevel>
+ implements DataApprovalLevelStore
{
// -------------------------------------------------------------------------
// DataApprovalLevelStore implementation
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/AddApprovalLevelAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/AddApprovalLevelAction.java 2014-03-28 10:13:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/system/AddApprovalLevelAction.java 2014-03-28 17:08:12 +0000
@@ -120,7 +120,7 @@
catOptGroupSet = dataElementCategoryService.getCategoryOptionGroupSet( categoryOptionGroupSet );
}
- DataApprovalLevel dataApprovalLevel = new DataApprovalLevel(orgUnitLevel, catOptGroupSet );
+ DataApprovalLevel dataApprovalLevel = new DataApprovalLevel( orgUnitLevel, catOptGroupSet );
boolean added = dataApprovalLevelService.addDataApprovalLevel( dataApprovalLevel );