You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/11/17 21:12:22 UTC
[12/50] [abbrv] incubator-usergrid git commit: Finished CP cleanup
Finished CP cleanup
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/1ea42f83
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/1ea42f83
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/1ea42f83
Branch: refs/heads/two-dot-o-events
Commit: 1ea42f834eadd99b545f6ae4e02b614f20afe936
Parents: 6ae1bef
Author: Todd Nine <tn...@apigee.com>
Authored: Mon Nov 10 16:20:41 2014 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Mon Nov 10 16:20:41 2014 -0700
----------------------------------------------------------------------
.../apache/usergrid/corepersistence/CpRelationManager.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1ea42f83/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 20309a7..561c269 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
@@ -619,8 +619,8 @@ public class CpRelationManager implements RelationManager {
}
- public Entity addToCollection( String collName, EntityRef itemRef,
- org.apache.usergrid.persistence.model.entity.Entity memberEntity, boolean connectBack )
+ public Entity addToCollection(final String collName, final EntityRef itemRef,
+ final org.apache.usergrid.persistence.model.entity.Entity memberEntity, final boolean connectBack )
throws Exception {
// don't fetch entity if we've already got one
@@ -646,12 +646,9 @@ public class CpRelationManager implements RelationManager {
applicationScope.getApplication(),
applicationScope.getApplication(),
CpNamingUtils.getCollectionScopeNameFromEntityType( itemRef.getType() ) );
- EntityCollectionManager memberMgr = managerCache.getEntityCollectionManager( memberScope );
//TODO, this double load should disappear once events are in
Id entityId = new SimpleId( itemRef.getUuid(), itemRef.getType() );
- org.apache.usergrid.persistence.model.entity.Entity memberEntity =
- ((CpEntityManager)em).load( new CpEntityManager.EntityScope( memberScope, entityId));
if ( memberEntity == null ) {
throw new RuntimeException(