← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2592: Fixed bug with preview import related to hibernate sessions/transactions

 

------------------------------------------------------------
revno: 2592
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-01-17 13:23:19 +0100
message:
  Fixed bug with preview import related to hibernate sessions/transactions
modified:
  dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.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-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2010-12-23 11:56:44 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2011-01-17 12:23:19 +0000
@@ -771,6 +771,23 @@
     }
 
     @Transactional
+    public void importDataEntryForms()
+    {
+        Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataEntryForm.class );
+
+        Importer<DataEntryForm> importer = new DataEntryFormImporter( dataEntryFormService );
+
+        for ( ImportObject importObject : importObjects )
+        {
+            importer.importObject( (DataEntryForm) importObject.getObject(), params );
+        }
+
+        importObjectStore.deleteImportObjects( Report.class );
+
+        log.info( "Imported Reports" );
+    }
+
+    @Transactional
     public void importDataSetMembers()
     {
         BatchHandler<GroupMemberAssociation> batchHandler = batchHandlerFactory
@@ -1146,20 +1163,4 @@
 
         importObjectStore.deleteImportObjects( type );
     }
-
-    public void importDataEntryForms()
-    {
-        Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataEntryForm.class );
-
-        Importer<DataEntryForm> importer = new DataEntryFormImporter( dataEntryFormService );
-
-        for ( ImportObject importObject : importObjects )
-        {
-            importer.importObject( (DataEntryForm) importObject.getObject(), params );
-        }
-
-        importObjectStore.deleteImportObjects( Report.class );
-
-        log.info( "Imported Reports" );
-    }
 }