← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2593: Minor fix

 

------------------------------------------------------------
revno: 2593
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-01-17 13:30:42 +0100
message:
  Minor fix
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	2011-01-17 12:23:19 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/service/DefaultImportObjectManager.java	2011-01-17 12:30:42 +0000
@@ -726,27 +726,6 @@
     }
 
     @Transactional
-    public void importDataSets()
-    {
-        BatchHandler<DataSet> batchHandler = batchHandlerFactory.createBatchHandler( DataSetBatchHandler.class ).init();
-
-        Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataSet.class );
-
-        Importer<DataSet> importer = new DataSetImporter( batchHandler, dataSetService );
-
-        for ( ImportObject importObject : importObjects )
-        {
-            importer.importObject( (DataSet) importObject.getObject(), params );
-        }
-
-        batchHandler.flush();
-
-        importObjectStore.deleteImportObjects( DataSet.class );
-
-        log.info( "Imported DataSets" );
-    }
-
-    @Transactional
     public void importDataDictionaryDataElements()
     {
         BatchHandler<GroupMemberAssociation> batchHandler = batchHandlerFactory
@@ -782,9 +761,30 @@
             importer.importObject( (DataEntryForm) importObject.getObject(), params );
         }
 
-        importObjectStore.deleteImportObjects( Report.class );
-
-        log.info( "Imported Reports" );
+        importObjectStore.deleteImportObjects( DataEntryForm.class );
+
+        log.info( "Imported DataEntryForms" );
+    }
+
+    @Transactional
+    public void importDataSets()
+    {
+        BatchHandler<DataSet> batchHandler = batchHandlerFactory.createBatchHandler( DataSetBatchHandler.class ).init();
+
+        Collection<ImportObject> importObjects = importObjectStore.getImportObjects( DataSet.class );
+
+        Importer<DataSet> importer = new DataSetImporter( batchHandler, dataSetService );
+
+        for ( ImportObject importObject : importObjects )
+        {
+            importer.importObject( (DataSet) importObject.getObject(), params );
+        }
+
+        batchHandler.flush();
+
+        importObjectStore.deleteImportObjects( DataSet.class );
+
+        log.info( "Imported DataSets" );
     }
 
     @Transactional