You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/08/22 16:16:20 UTC

[84/95] [abbrv] git commit: simple entity helps create connections

simple entity helps create connections


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f49a53fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f49a53fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f49a53fc

Branch: refs/heads/import-feature
Commit: f49a53fceca8ddefa2cf1bb3ed1121ad1ec4e309
Parents: dc0a13b
Author: Harish Rajagopal <hr...@apigee.com>
Authored: Tue Aug 5 11:56:20 2014 -0700
Committer: Harish Rajagopal <hr...@apigee.com>
Committed: Tue Aug 5 11:56:20 2014 -0700

----------------------------------------------------------------------
 .../management/importUG/ImportServiceImpl.java         | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f49a53fc/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
index f7a9ced..2e77cf2 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
@@ -22,11 +22,8 @@ import org.apache.usergrid.batch.service.SchedulerService;
 import org.apache.usergrid.management.ApplicationInfo;
 import org.apache.usergrid.management.ManagementService;
 import org.apache.usergrid.management.OrganizationInfo;
-import org.apache.usergrid.persistence.Entity;
-import org.apache.usergrid.persistence.EntityManager;
-import org.apache.usergrid.persistence.EntityManagerFactory;
-import org.apache.usergrid.persistence.EntityRef;
-import org.apache.usergrid.persistence.entities.Import;
+        import org.apache.usergrid.persistence.*;
+        import org.apache.usergrid.persistence.entities.Import;
 import org.apache.usergrid.persistence.entities.JobData;
 import org.codehaus.jackson.JsonFactory;
 import org.codehaus.jackson.JsonParseException;
@@ -628,6 +625,7 @@ public class ImportServiceImpl implements ImportService {
             this.ownerEntityRef = ownerEntityRef;
             this.connectionType = connectionType;
             this.entryRef = entryRef;
+
         }
 
         @Override
@@ -706,7 +704,7 @@ public class ImportServiceImpl implements ImportService {
                                 while (jp.nextToken() != JsonToken.END_ARRAY) {
                                     String entryId = jp.getText();
 
-                                    EntityRef entryRef = em.getRef(UUID.fromString(entryId));
+                                    EntityRef entryRef = new SimpleEntityRef(UUID.fromString(entityUuid));
                                     entityWrapper = new ConnectionEvent(ownerEntityRef, connectionType, entryRef);
                                     subscriber.onNext(entityWrapper);
                                     subscriber.onCompleted();
@@ -753,7 +751,8 @@ public class ImportServiceImpl implements ImportService {
                             }
                             entityWrapper = new EntityEvent(UUID.fromString(entityUuid), entityType, properties);
                             subscriber.onNext(entityWrapper);
-                            ownerEntityRef = em.getRef(UUID.fromString(entityUuid));
+                            ownerEntityRef = new SimpleEntityRef(entityType,UUID.fromString(entityUuid));
+                          //  ownerEntityRef = em.getRef(UUID.fromString(entityUuid));
                             subscriber.onCompleted();
                         }
                     } catch (IllegalArgumentException e) {