← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12593: fixes for meta-data import, wip

 

------------------------------------------------------------
revno: 12593
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-10-11 17:05:46 +0200
message:
  fixes for meta-data import, wip
modified:
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java
  dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.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-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2013-08-23 16:05:01 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultImportService.java	2013-10-11 15:05:46 +0000
@@ -149,7 +149,7 @@
                         ImportTypeSummary importTypeSummary = doImport( user, objects, importOptions );
 
                         // TODO do we need this?
-                        sessionFactory.getCurrentSession().flush();
+                        // sessionFactory.getCurrentSession().flush();
 
                         if ( importTypeSummary != null )
                         {
@@ -174,7 +174,7 @@
             sessionFactory.getCurrentSession().clear();
         }
 
-        cacheManager.clearCache();
+        // cacheManager.clearCache();
         objectBridge.destroy();
 
         if ( taskId != null )

=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2013-10-08 14:06:03 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/importers/DefaultIdentifiableObjectImporter.java	2013-10-11 15:05:46 +0000
@@ -110,7 +110,7 @@
     @Autowired
     private SessionFactory sessionFactory;
 
-    @Autowired( required = false )
+    @Autowired(required = false)
     private List<ObjectHandler<T>> objectHandlers;
 
     //-------------------------------------------------------------------------------------------------------
@@ -810,7 +810,10 @@
 
             // if ( !options.isDryRun() ) { }
             // TODO why do we have to invoke the setter on dryRun?
-            ReflectionUtils.invokeSetterMethod( field.getName(), object, reference );
+            if ( !options.isDryRun() )
+            {
+                ReflectionUtils.invokeSetterMethod( field.getName(), object, reference );
+            }
         }
     }