usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject incubator-usergrid git commit: Fixed ownership test along with adding the graph mechanism to createIteminCollections!
Date Mon, 20 Apr 2015 23:21:28 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev 8dafe7b57 -> 4cc2e0bfb


Fixed ownership test along with adding the graph mechanism to createIteminCollections!


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

Branch: refs/heads/two-dot-o-dev
Commit: 4cc2e0bfb2cb55833a032d8725a345c1a425a7eb
Parents: 8dafe7b
Author: GERey <greyes@apigee.com>
Authored: Mon Apr 20 16:21:26 2015 -0700
Committer: GERey <greyes@apigee.com>
Committed: Mon Apr 20 16:21:26 2015 -0700

----------------------------------------------------------------------
 .../apache/usergrid/corepersistence/CpRelationManager.java   | 7 +++++--
 .../org/apache/usergrid/persistence/EntityManagerIT.java     | 8 ++------
 2 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4cc2e0bf/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
index be8605e..a3d8172 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
@@ -505,8 +505,11 @@ public class CpRelationManager implements RelationManager {
             addToCollection( collName, itemEntity );
 
             if ( collection != null && collection.getLinkedCollection() != null )
{
-                throw new UnsupportedOperationException( "Implement me directly in graph
" );
-//                getRelationManager( getHeadEntity() ).addToCollection( collection.getLinkedCollection(),
itemEntity );
+                Id itemEntityId = new SimpleId( itemEntity.getUuid(),itemEntity.getType()
);
+                final Edge edge = createCollectionEdge( cpHeadEntity.getId(), collName, itemEntityId
);
+
+                GraphManager gm = managerCache.getGraphManager( applicationScope );
+                gm.writeEdge( edge );
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4cc2e0bf/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
index 3545739..f161040 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
@@ -26,19 +26,16 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.UUID;
 
-import org.apache.usergrid.corepersistence.util.CpNamingUtils;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.commons.lang3.RandomStringUtils;
-
 import org.apache.usergrid.AbstractCoreIT;
+import org.apache.usergrid.corepersistence.util.CpNamingUtils;
+import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.entities.Group;
 import org.apache.usergrid.persistence.entities.User;
-import org.apache.usergrid.persistence.Query;
-import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 import org.apache.usergrid.utils.UUIDUtils;
 
@@ -46,7 +43,6 @@ import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 


Mime
View raw message