usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [07/22] incubator-usergrid git commit: rename connecting to source and connected to target
Date Tue, 26 May 2015 18:13:06 GMT
rename connecting to source and connected to target


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

Branch: refs/heads/USERGRID-608
Commit: 5b1dfa1c8906cdf7e1a484b48f1944239e5b48ec
Parents: ed8ee9a
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Wed May 13 12:30:59 2015 -0700
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Wed May 13 12:30:59 2015 -0700

----------------------------------------------------------------------
 .../corepersistence/CpEntityManager.java        | 22 ++++++-------
 .../corepersistence/CpEntityManagerFactory.java |  8 ++---
 .../corepersistence/CpRelationManager.java      | 15 ++++-----
 .../corepersistence/index/IndexServiceImpl.java |  6 ++--
 .../usergrid/persistence/EntityManager.java     | 34 ++++++++++----------
 .../persistence/MultiQueryIterator.java         |  4 +--
 .../apache/usergrid/persistence/PathQuery.java  |  3 +-
 .../usergrid/persistence/RelationManager.java   | 12 +++----
 .../usergrid/persistence/CollectionIT.java      |  2 +-
 .../usergrid/persistence/CountingMutatorIT.java |  6 ++--
 .../persistence/EntityConnectionsIT.java        | 26 +++++++--------
 .../org/apache/usergrid/persistence/GeoIT.java  |  8 ++---
 .../PerformanceEntityRebuildIndexTest.java      |  8 ++---
 .../persistence/query/ConnectionHelper.java     |  2 +-
 .../persistence/query/IteratingQueryIT.java     |  2 +-
 .../rest/management/ImportResourceIT.java       |  2 +-
 .../cassandra/ManagementServiceImpl.java        | 12 +++----
 .../management/export/ExportServiceImpl.java    |  4 +--
 .../management/importer/FileImportJob.java      |  5 ++-
 .../management/importer/ImportServiceImpl.java  | 15 ++++-----
 .../services/AbstractConnectionsService.java    | 24 +++++++-------
 .../users/activities/ActivitiesService.java     |  4 +--
 .../users/activities/ActivitiesService.java     |  4 +--
 .../management/importer/ImportCollectionIT.java |  2 +-
 .../importer/ImportConnectionsTest.java         |  9 +++---
 .../management/importer/ImportServiceIT.java    |  6 ++--
 26 files changed, 114 insertions(+), 131 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index 9430c4e..63018cb 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -1515,35 +1515,35 @@ public class CpEntityManager implements EntityManager {
 
 
     @Override
-    public Results getConnectedEntities( EntityRef entityRef, String connectionType,
-            String connectedEntityType, Level resultsLevel ) throws Exception {
+    public Results getTargetEntities(EntityRef entityRef, String connectionType,
+                                     String connectedEntityType, Level resultsLevel) throws Exception {
 
         return getRelationManager( entityRef )
-                .getConnectedEntities( connectionType, connectedEntityType, resultsLevel );
+                .getTargetEntities(connectionType, connectedEntityType, resultsLevel);
     }
 
 
     @Override
-    public Results getConnectingEntities( EntityRef entityRef, String connectionType,
-            String connectedEntityType, Level resultsLevel ) throws Exception {
+    public Results getSourceEntities(EntityRef entityRef, String connectionType,
+                                     String connectedEntityType, Level resultsLevel) throws Exception {
 
         return getRelationManager( entityRef )
-                .getConnectingEntities( connectionType, connectedEntityType, resultsLevel );
+                .getSourceEntities(connectionType, connectedEntityType, resultsLevel);
     }
 
 
     @Override
-    public Results getConnectingEntities( EntityRef entityRef, String connectionType,
-            String entityType, Level level, int count ) throws Exception {
+    public Results getSourceEntities(EntityRef entityRef, String connectionType,
+                                     String entityType, Level level, int count) throws Exception {
 
-        return getRelationManager( entityRef ).getConnectingEntities( connectionType, entityType, level, count );
+        return getRelationManager( entityRef ).getSourceEntities(connectionType, entityType, level, count);
     }
 
 
     @Override
-    public Results searchConnectedEntities( EntityRef connectingEntity, Query query ) throws Exception {
+    public Results searchTargetEntities(EntityRef connectingEntity, Query query) throws Exception {
 
-        return getRelationManager( connectingEntity ).searchConnectedEntities( query );
+        return getRelationManager( connectingEntity ).searchTargetEntities(query);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index e796545..63e2869 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -204,7 +204,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
 
     @Override
     public Entity createApplicationV2(String organizationName, String name) throws Exception {
-        return createApplicationV2( organizationName, name, null );
+        return createApplicationV2(organizationName, name, null);
     }
 
 
@@ -262,7 +262,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
             properties = new TreeMap<>( CASE_INSENSITIVE_ORDER );
         }
         properties.put( PROPERTY_NAME, appName );
-        EntityManager appEm = getEntityManager( applicationId);
+        EntityManager appEm = getEntityManager(applicationId);
         appEm.create(applicationId, TYPE_APPLICATION, properties);
         appEm.resetRoles();
      //   entityIndex.refreshAsync();//.toBlocking().last();
@@ -356,7 +356,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
             copyConnections = Observable.from(connectionTypes).doOnNext(connType -> {
                 try {
                     final Results connResults =
-                        managementEm.getConnectedEntities(oldAppEntity, connType, null, Query.Level.ALL_PROPERTIES);
+                        managementEm.getTargetEntities(oldAppEntity, connType, null, Query.Level.ALL_PROPERTIES);
                     connResults.getEntities().forEach(entity -> {
                         try {
                             managementEm.createConnection(newAppEntity, connType, entity);
@@ -420,7 +420,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
         Map<String, UUID> appMap = new HashMap<>();
 
         ApplicationScope appScope =
-            CpNamingUtils.getApplicationScope(CpNamingUtils.MANAGEMENT_APPLICATION_ID );
+            CpNamingUtils.getApplicationScope(CpNamingUtils.MANAGEMENT_APPLICATION_ID);
         GraphManager gm = managerCache.getGraphManager(appScope);
 
         EntityManager em = getEntityManager(CpNamingUtils.MANAGEMENT_APPLICATION_ID);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/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 bd3d137..4993d88 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
@@ -20,7 +20,6 @@ package org.apache.usergrid.corepersistence;
 import java.util.*;
 
 import org.apache.usergrid.persistence.graph.*;
-import org.apache.usergrid.utils.UUIDUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.Assert;
@@ -576,7 +575,7 @@ public class CpRelationManager implements RelationManager {
                 results = em.getCollection( headEntity, srcRelationName, null, 5000, Level.REFS, false );
             }
             else {
-                results = em.getConnectedEntities( headEntity, srcRelationName, null, Level.REFS );
+                results = em.getTargetEntities(headEntity, srcRelationName, null, Level.REFS);
             }
 
             if ( ( results != null ) && ( results.size() > 0 ) ) {
@@ -837,7 +836,7 @@ public class CpRelationManager implements RelationManager {
 
 
     @Override
-    public Results getConnectedEntities( String connectionType, String connectedEntityType, Level level )
+    public Results getTargetEntities(String connectionType, String connectedEntityType, Level level)
         throws Exception {
 
         //until this is refactored properly, we will delegate to a search by query
@@ -850,20 +849,20 @@ public class CpRelationManager implements RelationManager {
         query.setEntityType( connectedEntityType );
         query.setResultsLevel( level );
 
-        return searchConnectedEntities( query );
+        return searchTargetEntities(query);
     }
 
 
     @Override
-    public Results getConnectingEntities( String connType, String fromEntityType, Level resultsLevel )
+    public Results getSourceEntities(String connType, String fromEntityType, Level resultsLevel)
         throws Exception {
 
-        return getConnectingEntities( connType, fromEntityType, resultsLevel, -1 );
+        return getSourceEntities(connType, fromEntityType, resultsLevel, -1);
     }
 
 
     @Override
-    public Results getConnectingEntities( String connType, String fromEntityType, Level level, int count )
+    public Results getSourceEntities(String connType, String fromEntityType, Level level, int count)
         throws Exception {
 
         // looking for edges to the head entity
@@ -896,7 +895,7 @@ public class CpRelationManager implements RelationManager {
 
 
     @Override
-    public Results searchConnectedEntities( Query query ) throws Exception {
+    public Results searchTargetEntities(Query query) throws Exception {
 
         Preconditions.checkNotNull( query, "query cannot be null" );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
index 8185b4d..1fc8eea 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
@@ -104,11 +104,11 @@ public class IndexServiceImpl implements IndexService {
 
 
         //we might or might not need to index from target-> source
-        final Observable<IndexEdge> targetSizes = getIndexEdgesAsTarget( gm, entityId );
+        final Observable<IndexEdge> edgesToSource = getIndexEdgesAsTarget( gm, entityId );
 
 
         //merge the edges together
-        final Observable<IndexEdge> observable = Observable.merge( sourceEdgesToIndex, targetSizes);
+        final Observable<IndexEdge> observable = Observable.merge( sourceEdgesToIndex, edgesToSource);
         //do our observable for batching
         //try to send a whole batch if we can
 
@@ -134,8 +134,6 @@ public class IndexServiceImpl implements IndexService {
     @Override
     public Observable<IndexOperationMessage> indexEdge( final ApplicationScope applicationScope, final Entity entity, final Edge edge ) {
 
-
-
         final Observable<IndexOperationMessage> batches =  Observable.just( edge ).map( observableEdge -> {
 
             //if the node is the target node, generate our scope correctly

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
index b8d3360..774a0fb 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
@@ -420,25 +420,25 @@ public interface EntityManager {
      */
     public ConnectionRef createConnection( ConnectionRef connection ) throws Exception;
 
-    public ConnectionRef createConnection( EntityRef connectingEntity, String connectionType,
-                                           EntityRef connectedEntityRef ) throws Exception;
+    public ConnectionRef createConnection( EntityRef sourceEntity, String connectionType,
+                                           EntityRef targetEntityRef ) throws Exception;
 
-    public ConnectionRef createConnection( EntityRef connectingEntity, String pairedConnectionType,
+    public ConnectionRef createConnection( EntityRef sourceEntity, String pairedConnectionType,
                                            EntityRef pairedEntity, String connectionType,
-                                           EntityRef connectedEntityRef ) throws Exception;
+                                           EntityRef targetEntityRef ) throws Exception;
 
     public ConnectionRef createConnection(
-            EntityRef connectingEntity, ConnectedEntityRef... connections )
+            EntityRef sourceEntity, ConnectedEntityRef... connections )
             throws Exception;
 
-    public ConnectionRef connectionRef( EntityRef connectingEntity, String connectionType,
-                                        EntityRef connectedEntityRef ) throws Exception;
+    public ConnectionRef connectionRef( EntityRef sourceEntity, String connectionType,
+                                        EntityRef targetEntityRef ) throws Exception;
 
-    public ConnectionRef connectionRef( EntityRef connectingEntity, String pairedConnectionType,
-            EntityRef pairedEntity, String connectionType, EntityRef connectedEntityRef )
+    public ConnectionRef connectionRef( EntityRef sourceEntity, String pairedConnectionType,
+            EntityRef pairedEntity, String connectionType, EntityRef targetEntityRef )
             throws Exception;
 
-    public ConnectionRef connectionRef( EntityRef connectingEntity, ConnectedEntityRef... connections );
+    public ConnectionRef connectionRef( EntityRef sourceEntity, ConnectedEntityRef... connections );
 
     /**
      * Disconnects two connected entities with the specified connection type. Connections are
@@ -464,8 +464,8 @@ public interface EntityManager {
      *
      * @throws Exception the exception
      */
-    public Results getConnectedEntities( EntityRef entityRef, String connectionType,
-            String connectedEntityType, Level resultsLevel ) throws Exception;
+    public Results getTargetEntities(EntityRef entityRef, String connectionType,
+                                     String connectedEntityType, Level resultsLevel) throws Exception;
 
     /**
      * Gets the entities connecting to this entity, optionally with the specified connection
@@ -481,13 +481,13 @@ public interface EntityManager {
      *
      * @throws Exception the exception
      */
-    public Results getConnectingEntities( EntityRef entityRef, String connectionType,
-            String connectedEntityType, Level resultsLevel ) throws Exception;
+    public Results getSourceEntities(EntityRef entityRef, String connectionType,
+                                     String connectedEntityType, Level resultsLevel) throws Exception;
 
-    public Results getConnectingEntities( EntityRef entityRef, String connectionType,
-    		String entityType, Level level, int count) throws Exception;
+    public Results getSourceEntities(EntityRef entityRef, String connectionType,
+                                     String entityType, Level level, int count) throws Exception;
 
-	public Results searchConnectedEntities( EntityRef connectingEntity, Query query ) throws Exception;
+	public Results searchTargetEntities(EntityRef sourceEntity, Query query) throws Exception;
 
 
     // Application roles

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java
index c32f429..3662c63 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/MultiQueryIterator.java
@@ -17,10 +17,8 @@
 package org.apache.usergrid.persistence;
 
 
-import org.apache.usergrid.persistence.Query;
 import java.util.Iterator;
 import java.util.UUID;
-import org.apache.usergrid.persistence.Query.Level;
 
 
 /**
@@ -94,7 +92,7 @@ public class MultiQueryIterator implements ResultsIterator {
         try {
             return ( query.getCollection() != null ) ?
                    entityManager.searchCollection( entityRef, query.getCollection(), query ) :
-                   entityManager.searchConnectedEntities( entityRef, query );
+                   entityManager.searchTargetEntities(entityRef, query);
         }
         catch ( Exception e ) {
             throw new RuntimeException( e );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java b/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java
index 58b9522..bb336e1 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/PathQuery.java
@@ -17,7 +17,6 @@
 package org.apache.usergrid.persistence;
 
 
-import org.apache.usergrid.persistence.Query;
 import java.util.Iterator;
 import java.util.UUID;
 
@@ -103,7 +102,7 @@ public class PathQuery<E> {
         EntityRef ref = new SimpleEntityRef(type,uuid);
         return ( query.getCollection() != null ) ?
                em.searchCollection( ref, query.getCollection(), query ) :
-               em.searchConnectedEntities( ref, query );
+               em.searchTargetEntities(ref, query);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java
index 84e4a38..0b2fca8 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/RelationManager.java
@@ -106,11 +106,11 @@ public interface RelationManager {
      * @param connectionType The type/name of the connection
      * @param connectedEntityType The type of
      */
-    public Results getConnectedEntities( String connectionType, String connectedEntityType, Level resultsLevel )
+    public Results getTargetEntities(String connectionType, String connectedEntityType, Level resultsLevel)
             throws Exception;
 
-    public Results getConnectingEntities( String connectionType, String connectedEntityType,
-                                          Level resultsLevel ) throws Exception;
+    public Results getSourceEntities(String connectionType, String connectedEntityType,
+                                     Level resultsLevel) throws Exception;
 
     // public Results searchConnectedEntitiesForProperty(String connectionType,
     // String connectedEntityType, String propertyName,
@@ -118,10 +118,10 @@ public interface RelationManager {
     // UUID startResult, int count, boolean reversed, Level resultsLevel)
     // throws Exception;
 
-    public Results getConnectingEntities(
-            String connectionType, String entityType, Level level, int count) throws Exception;
+    public Results getSourceEntities(
+        String connectionType, String entityType, Level level, int count) throws Exception;
 
-	public Results searchConnectedEntities( Query query ) throws Exception;
+	public Results searchTargetEntities(Query query) throws Exception;
 
 
     public Set<String> getConnectionIndexes( String connectionType ) throws Exception;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
index e3149d6..eab04ce 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionIT.java
@@ -1455,7 +1455,7 @@ public class CollectionIT extends AbstractCoreIT {
         query.setConnectionType( "testconnection" );
         query.setEntityType( "user" );
 
-        r = em.searchConnectedEntities( foo, query );
+        r = em.searchTargetEntities(foo, query);
 
         assertEquals( "connection must match", 1, r.size() );
         assertEquals( entity.getUuid(), r.getId() );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/CountingMutatorIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CountingMutatorIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CountingMutatorIT.java
index abb9417..63c7cb8 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CountingMutatorIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CountingMutatorIT.java
@@ -27,8 +27,6 @@ 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.persistence.hector.CountingMutator;
 import org.apache.usergrid.persistence.Query.Level;
@@ -99,8 +97,8 @@ public class CountingMutatorIT extends AbstractCoreIT {
 
         //now verify our connections were created properly
 
-        PagingResultsIterator itr = new PagingResultsIterator(em.getConnectingEntities(
-                returned, "following", "user", Level.ALL_PROPERTIES, 1000 ));
+        PagingResultsIterator itr = new PagingResultsIterator(em.getSourceEntities(
+            returned, "following", "user", Level.ALL_PROPERTIES, 1000));
 
         int count = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
index e1b2f5e..47b61e9 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
@@ -72,7 +72,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
 
         app.refreshIndex();
 
-        Results r = em.getConnectedEntities( firstUserEntity, "likes", null, Level.IDS );
+        Results r = em.getTargetEntities(firstUserEntity, "likes", null, Level.IDS);
 
         List<ConnectionRef> connections = r.getConnections();
 
@@ -186,7 +186,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
         EntityManager em = setup.getEmf().getEntityManager( applicationId );
         Entity en = em.get( new SimpleEntityRef( entityType, entityId));
 
-        Results results = em.getConnectedEntities( en, connectionType, null, Level.REFS );
+        Results results = em.getTargetEntities(en, connectionType, null, Level.REFS);
 
         LOG.info( "----------------------------------------------------" );
         assertEquals( "Expected " + expectedCount + " connections",
@@ -264,7 +264,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
 
         app.refreshIndex();
 
-        Results r = em.getConnectedEntities( firstUserEntity, "likes", "restaurant", Level.IDS );
+        Results r = em.getTargetEntities(firstUserEntity, "likes", "restaurant", Level.IDS);
 
         List<ConnectionRef> connections = r.getConnections();
 
@@ -278,7 +278,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
         assertFalse( em.isConnectionMember( firstUserEntity, "likes", arrogantbutcher ) );
 
         // check we don't get the restaurant from the second user
-        r = em.getConnectedEntities( secondUserEntity, "likes", "restaurant", Level.IDS );
+        r = em.getTargetEntities(secondUserEntity, "likes", "restaurant", Level.IDS);
 
         connections = r.getConnections();
 
@@ -320,19 +320,19 @@ public class EntityConnectionsIT extends AbstractCoreIT {
 
 //        // search for "likes" edges from fred
 //        assertEquals( 1,
-//            em.getConnectedEntities( fredEntity, "likes", null, Level.IDS ).size());
+//            em.getTargetEntities( fredEntity, "likes", null, Level.IDS ).size());
 //
 //        // search for any type of edges from fred
 //        assertEquals( 1,
-//            em.getConnectedEntities( fredEntity, null, null, Level.IDS ).size());
+//            em.getTargetEntities( fredEntity, null, null, Level.IDS ).size());
 
         // search for "likes" edges to wilman from any type of object
-        Results res = em.getConnectingEntities( wilmaEntity, "likes", null, Level.ALL_PROPERTIES);
+        Results res = em.getSourceEntities(wilmaEntity, "likes", null, Level.ALL_PROPERTIES);
         assertEquals( 1, res.size() );
         assertEquals( "user", res.getEntity().getType() ); // fred is a user
 
         // search for "likes" edges to wilman from user type object
-        res = em.getConnectingEntities( wilmaEntity, "likes", "user", Level.ALL_PROPERTIES);
+        res = em.getSourceEntities(wilmaEntity, "likes", "user", Level.ALL_PROPERTIES);
         assertEquals( 1, res.size() );
         assertEquals( "user", res.getEntity().getType() );
     }
@@ -372,7 +372,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
 
         app.refreshIndex();
 
-        Results r = em.getConnectedEntities( firstUserEntity, "likes", null, Level.ALL_PROPERTIES ) ;
+        Results r = em.getTargetEntities(firstUserEntity, "likes", null, Level.ALL_PROPERTIES) ;
 
         PagingResultsIterator itr = new PagingResultsIterator( r );
 
@@ -418,19 +418,19 @@ public class EntityConnectionsIT extends AbstractCoreIT {
 //
 ////        // search for "likes" edges from fred
 ////        assertEquals( 1,
-////            em.getConnectedEntities( fredEntity, "likes", null, Level.IDS ).size());
+////            em.getTargetEntities( fredEntity, "likes", null, Level.IDS ).size());
 ////
 ////        // search for any type of edges from fred
 ////        assertEquals( 1,
-////            em.getConnectedEntities( fredEntity, null, null, Level.IDS ).size());
+////            em.getTargetEntities( fredEntity, null, null, Level.IDS ).size());
 //
 //        // search for "likes" edges to wilman from any type of object
-//        Results res = em.getConnectingEntities( wilmaEntity, "likes", null, Level.ALL_PROPERTIES);
+//        Results res = em.getSourceEntities( wilmaEntity, "likes", null, Level.ALL_PROPERTIES);
 //        assertEquals( 1, res.size() );
 //        assertEquals( "user", res.getEntity().getType() ); // fred is a user
 //
 //        // search for "likes" edges to wilman from user type object
-//        res = em.getConnectingEntities( wilmaEntity, "likes", "user", Level.ALL_PROPERTIES);
+//        res = em.getSourceEntities( wilmaEntity, "likes", "user", Level.ALL_PROPERTIES);
 //        assertEquals( 1, res.size() );
 //        assertEquals( "user", res.getEntity().getType() );
 //    }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
index 585735a..c837ab7 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
@@ -199,18 +199,18 @@ public class GeoIT extends AbstractCoreIT {
 
         app.refreshIndex();
         //4. Test that the user is within 2000m of the entity
-        Results emSearchResults = em.searchConnectedEntities(user,
+        Results emSearchResults = em.searchTargetEntities(user,
             Query.fromQL("location within 5000 of "
                 + ((LinkedHashMap<String, Object>) userProperties.get("location")).get("latitude")
                 + ", " + ((LinkedHashMap<String, Object>)
-                        userProperties.get("location")).get("longitude")).setConnectionType("likes"));
+                userProperties.get("location")).get("longitude")).setConnectionType("likes"));
         assertEquals(1, emSearchResults.size());
         //5. Test that the user is NOT within 1000m of the entity
-        emSearchResults = em.searchConnectedEntities(user,
+        emSearchResults = em.searchTargetEntities(user,
             Query.fromQL("location within 1000 of "
                 + ((LinkedHashMap<String, Object>) userProperties.get("location")).get("latitude")
                 + ", " + ((LinkedHashMap<String, Object>)
-                        userProperties.get("location")).get("longitude")).setConnectionType("likes"));
+                userProperties.get("location")).get("longitude")).setConnectionType("likes"));
         assertEquals(0, emSearchResults.size());
         //cleanup
         em.delete(user);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
index df2a762..181b5de 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
@@ -35,13 +35,9 @@ import org.slf4j.LoggerFactory;
 
 import org.apache.usergrid.AbstractCoreIT;
 import org.apache.usergrid.cassandra.SpringResource;
-import org.apache.usergrid.corepersistence.util.CpNamingUtils;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
-import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
-import org.apache.usergrid.persistence.index.impl.EsEntityIndexImpl;
-import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.persistence.model.entity.Id;
 import org.apache.usergrid.persistence.model.entity.SimpleId;
 
@@ -410,8 +406,8 @@ public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
 
                 assertEquals( 2000, e.getProperty("key2"));
 
-                Results catResults = em.searchConnectedEntities(e,
-                    Query.fromQL("select *").setConnectionType( "herds" ));
+                Results catResults = em.searchTargetEntities(e,
+                    Query.fromQL("select *").setConnectionType("herds"));
                 assertEquals( expectedConnections, catResults.size() );
 
                 if ( count % 100 == 0 ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/query/ConnectionHelper.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/ConnectionHelper.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/ConnectionHelper.java
index e99ae9c..e5c84f8 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/ConnectionHelper.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/ConnectionHelper.java
@@ -80,6 +80,6 @@ public class ConnectionHelper extends CollectionIoHelper {
         query.setConnectionType( CONNECTION );
         query.setEntityType( "test" );
 
-        return app.getEntityManager().searchConnectedEntities( rootEntity, query );
+        return app.getEntityManager().searchTargetEntities(rootEntity, query);
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
index 17db7f5..c4a16b6 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java
@@ -275,7 +275,7 @@ public class IteratingQueryIT {
             query.setConnectionType( CONNECTION );
             // don't set it on purpose
             query.setEntityType( null );
-            return app.getEntityManager().searchConnectedEntities( rootEntity, query );
+            return app.getEntityManager().searchTargetEntities(rootEntity, query);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
index 70b9b69..e33d488 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
@@ -360,7 +360,7 @@ public class ImportResourceIT extends AbstractRestIT {
 //
 //            int conCount = 0;
 //            for ( org.apache.usergrid.persistence.Entity e : importedThings ) {
-//                Results r = emApp2.getConnectedEntities( e, "related", null, Query.Level.IDS);
+//                Results r = emApp2.getTargetEntities( e, "related", null, Query.Level.IDS);
 //                List<ConnectionRef> connections = r.getConnections();
 //                conCount += connections.size();
 //            }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 7909439..d9068bd 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -1730,9 +1730,9 @@ public class ManagementServiceImpl implements ManagementService {
 
         final EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
 
-        Results r = em.getConnectingEntities(
-                new SimpleEntityRef(CpNamingUtils.APPLICATION_INFO, applicationInfoId),
-                "owns", Group.ENTITY_TYPE, Level.ALL_PROPERTIES );
+        Results r = em.getSourceEntities(
+            new SimpleEntityRef(CpNamingUtils.APPLICATION_INFO, applicationInfoId),
+            "owns", Group.ENTITY_TYPE, Level.ALL_PROPERTIES);
 
         Entity entity = r.getEntity();
         if ( entity != null ) {
@@ -1753,9 +1753,9 @@ public class ManagementServiceImpl implements ManagementService {
         final EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
 
         // query for application_info entities
-        final Results results = em.getConnectedEntities(
-                new SimpleEntityRef(Group.ENTITY_TYPE, organizationGroupId),
-                "owns", CpNamingUtils.APPLICATION_INFO, Level.ALL_PROPERTIES );
+        final Results results = em.getTargetEntities(
+            new SimpleEntityRef(Group.ENTITY_TYPE, organizationGroupId),
+            "owns", CpNamingUtils.APPLICATION_INFO, Level.ALL_PROPERTIES);
 
         final PagingResultsIterator itr = new PagingResultsIterator( results );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
index ec3b86c..31e8544 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
@@ -508,9 +508,9 @@ public class ExportServiceImpl implements ExportService {
             jg.writeFieldName( connectionType );
             jg.writeStartArray();
 
-            Results results = em.getConnectedEntities(
+            Results results = em.getTargetEntities(
                 new SimpleEntityRef(entity.getType(), entity.getUuid()),
-                connectionType, null, Level.IDS );
+                connectionType, null, Level.IDS);
 
             List<ConnectionRef> connections = results.getConnections();
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/management/importer/FileImportJob.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/importer/FileImportJob.java b/stack/services/src/main/java/org/apache/usergrid/management/importer/FileImportJob.java
index c656e96..f734b3f 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/importer/FileImportJob.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/importer/FileImportJob.java
@@ -19,7 +19,6 @@ package org.apache.usergrid.management.importer;
 
 import org.apache.usergrid.batch.JobExecution;
 import org.apache.usergrid.batch.job.OnlyOnceJob;
-import org.apache.usergrid.corepersistence.util.CpNamingUtils;
 import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.EntityManagerFactory;
@@ -112,8 +111,8 @@ public class FileImportJob extends OnlyOnceJob {
         rootEm.update(fileImport);
 
         // If one file Job fails, mark the main import Job also as failed
-        Results ImportJobResults = rootEm.getConnectingEntities(
-                fileImport, "includes", null, Level.ALL_PROPERTIES);
+        Results ImportJobResults = rootEm.getSourceEntities(
+            fileImport, "includes", null, Level.ALL_PROPERTIES);
         List<Entity> importEntity = ImportJobResults.getEntities();
         UUID importId = importEntity.get(0).getUuid();
         Import importUG = rootEm.get(importId, Import.class);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
index 18879c0..e446144 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
@@ -40,7 +40,6 @@ import org.slf4j.LoggerFactory;
 import rx.Observable;
 import rx.Subscriber;
 import rx.functions.Action1;
-import rx.functions.Func1;
 import rx.functions.Func2;
 import rx.schedulers.Schedulers;
 
@@ -213,7 +212,7 @@ public class ImportServiceImpl implements ImportService {
             //set our entity type
             query.setEntityType( Schema.getDefaultSchema().getEntityType( FileImport.class ) );
 
-            return rootEm.searchConnectedEntities( importEntity, query );
+            return rootEm.searchTargetEntities(importEntity, query);
         }
         catch ( Exception e ) {
             throw new RuntimeException( "Unable to get import entity", e );
@@ -272,7 +271,7 @@ public class ImportServiceImpl implements ImportService {
             //set our entity type
             query.setEntityType( Schema.getDefaultSchema().getEntityType( FailedImportEntity.class ) );
 
-            return rootEm.searchConnectedEntities( importEntity,  query );
+            return rootEm.searchTargetEntities(importEntity, query);
         }
         catch ( Exception e ) {
             throw new RuntimeException( "Unable to get import entity", e );
@@ -382,11 +381,11 @@ public class ImportServiceImpl implements ImportService {
             query.setLimit(MAX_FILE_IMPORTS);
 
             // TODO, this won't work with more than 100 files
-            Results entities = rootEM.searchConnectedEntities( importRoot, query );
+            Results entities = rootEM.searchTargetEntities(importRoot, query);
             return entities.size();
 
             // see ImportConnectsTest()
-//            Results entities = rootEM.getConnectedEntities(
+//            Results entities = rootEM.getTargetEntities(
 //              importRoot, "includes", null, Level.ALL_PROPERTIES );
 //            PagingResultsIterator itr = new PagingResultsIterator( entities );
 //            int count = 0;
@@ -767,8 +766,8 @@ public class ImportServiceImpl implements ImportService {
     private Import getImportEntity( final EntityManager rootEm, final FileImport fileImport ) {
         try {
             Results importJobResults =
-                rootEm.getConnectingEntities( fileImport, IMPORT_FILE_INCLUDES_CONNECTION,
-                    null, Level.ALL_PROPERTIES );
+                rootEm.getSourceEntities(fileImport, IMPORT_FILE_INCLUDES_CONNECTION,
+                    null, Level.ALL_PROPERTIES);
 
             List<Entity> importEntities = importJobResults.getEntities();
             final Import importEntity = ( Import ) importEntities.get( 0 ).toTypedEntity();
@@ -802,7 +801,7 @@ public class ImportServiceImpl implements ImportService {
             query.setConnectionType( IMPORT_FILE_INCLUDES_CONNECTION );
             query.setLimit( MAX_FILE_IMPORTS );
 
-            Results entities = rootEM.searchConnectedEntities( importEntity, query );
+            Results entities = rootEM.searchTargetEntities(importEntity, query);
             PagingResultsIterator itr = new PagingResultsIterator( entities );
 
             if ( !itr.hasNext() ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
index 467b09e..c4142a0 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
@@ -172,14 +172,14 @@ public class AbstractConnectionsService extends AbstractService {
         Results r = null;
 
         if ( connecting() ) {
-            r = em.getConnectingEntities(
-                new SimpleEntityRef( context.getOwner().getType(), context.getOwner().getUuid()),
-                context.getCollectionName(), null, Level.ALL_PROPERTIES );
+            r = em.getSourceEntities(
+                new SimpleEntityRef(context.getOwner().getType(), context.getOwner().getUuid()),
+                context.getCollectionName(), null, Level.ALL_PROPERTIES);
         }
         else {
-            r = em.getConnectedEntities(
-                new SimpleEntityRef( context.getOwner().getType(), context.getOwner().getUuid()),
-                context.getCollectionName(), null, Level.ALL_PROPERTIES );
+            r = em.getTargetEntities(
+                new SimpleEntityRef(context.getOwner().getType(), context.getOwner().getUuid()),
+                context.getCollectionName(), null, Level.ALL_PROPERTIES);
         }
 
         importEntities( context, r );
@@ -302,17 +302,17 @@ public class AbstractConnectionsService extends AbstractService {
                 return null;
             }
             else {
-//            	r = em.getConnectingEntities( context.getOwner().getUuid(), query.getConnectionType(),
+//            	r = em.getSourceEntities( context.getOwner().getUuid(), query.getConnectionType(),
 //            			query.getEntityType(), level );
                 // usergrid-2389: User defined limit in the query is ignored. Fixed it by adding
                 // the limit to the method parameter downstream.
-            	r = em.getConnectingEntities(
-                    new SimpleEntityRef( context.getOwner().getType(), context.getOwner().getUuid()),
-                    query.getConnectionType(),query.getEntityType(), level , query.getLimit());
+            	r = em.getSourceEntities(
+                    new SimpleEntityRef(context.getOwner().getType(), context.getOwner().getUuid()),
+                    query.getConnectionType(), query.getEntityType(), level, query.getLimit());
             }
         }
         else {
-            r = em.searchConnectedEntities( context.getOwner(), query );
+            r = em.searchTargetEntities(context.getOwner(), query);
         }
 
         importEntities( context, r );
@@ -419,7 +419,7 @@ public class AbstractConnectionsService extends AbstractService {
         }
 
 
-        Results r = em.searchConnectedEntities( context.getOwner(), query );
+        Results r = em.searchTargetEntities(context.getOwner(), query);
         if ( r.isEmpty() ) {
             throw new ServiceResourceNotFoundException( context );
         }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/services/groups/users/activities/ActivitiesService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/groups/users/activities/ActivitiesService.java b/stack/services/src/main/java/org/apache/usergrid/services/groups/users/activities/ActivitiesService.java
index ebf3676..014dcff 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/groups/users/activities/ActivitiesService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/groups/users/activities/ActivitiesService.java
@@ -74,8 +74,8 @@ public class ActivitiesService extends GenericCollectionService {
             return;
         }
 
-        Results r2 = em.getConnectingEntities( new SimpleEntityRef( user.getType(), user.getUuid()),
-            "following", User.ENTITY_TYPE, Level.IDS );
+        Results r2 = em.getSourceEntities(new SimpleEntityRef(user.getType(), user.getUuid()),
+            "following", User.ENTITY_TYPE, Level.IDS);
 
         if ( ( r2 == null ) || ( r2.isEmpty() ) ) {
             return;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/main/java/org/apache/usergrid/services/users/activities/ActivitiesService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/users/activities/ActivitiesService.java b/stack/services/src/main/java/org/apache/usergrid/services/users/activities/ActivitiesService.java
index e7f3268..c297864 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/users/activities/ActivitiesService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/users/activities/ActivitiesService.java
@@ -133,8 +133,8 @@ public class ActivitiesService extends GenericCollectionService {
         em.addToCollection( user, "feed", activity );
 
         //publish to all connections
-        Results results =  em.getConnectingEntities(
-            new SimpleEntityRef( user.getType(), user.getUuid()),
+        Results results =  em.getSourceEntities(
+            new SimpleEntityRef(user.getType(), user.getUuid()),
             "following", User.ENTITY_TYPE, Level.REFS);
 
         if( results != null ){

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
index 7350dcd..4c78a1e 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportCollectionIT.java
@@ -203,7 +203,7 @@ public class ImportCollectionIT {
 
             int conCount = 0;
             for ( Entity e : importedThings ) {
-                Results r = emApp2.getConnectedEntities( e, "related", null, Level.IDS);
+                Results r = emApp2.getTargetEntities(e, "related", null, Level.IDS);
                 List<ConnectionRef> connections = r.getConnections();
                 conCount += connections.size();
             }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
index 2c9db95..8ca3caa 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
@@ -31,7 +31,6 @@ import org.apache.usergrid.NewOrgAppAdminRule;
 import org.apache.usergrid.ServiceITSetup;
 import org.apache.usergrid.ServiceITSetupImpl;
 import org.apache.usergrid.cassandra.ClearShiroSubject;
-import org.apache.usergrid.corepersistence.util.CpNamingUtils;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.PagingResultsIterator;
 import org.apache.usergrid.persistence.Results;
@@ -59,7 +58,7 @@ public class ImportConnectionsTest {
 
 
     @Test
-    @Ignore("Because getConnectedEntities() is broken")
+    @Ignore("Because getTargetEntities() is broken")
     public void testCreateAndCountConnectionsViaGet() throws Exception {
 
         doTestCreateAndCountConnections(new ConnectionCounter() {
@@ -135,8 +134,8 @@ public class ImportConnectionsTest {
             EntityManager emMgmtApp = setup.getEmf()
                 .getEntityManager(setup.getEmf().getManagementAppId() );
 
-            Results entities = emMgmtApp.getConnectedEntities(
-                importRoot, "includes", null, Query.Level.ALL_PROPERTIES );
+            Results entities = emMgmtApp.getTargetEntities(
+                importRoot, "includes", null, Query.Level.ALL_PROPERTIES);
 
             PagingResultsIterator itr = new PagingResultsIterator( entities );
             int count = 0;
@@ -164,7 +163,7 @@ public class ImportConnectionsTest {
             query.setConnectionType("includes");
             query.setLimit(10000);
 
-            Results entities = emMgmtApp.searchConnectedEntities( importRoot, query );
+            Results entities = emMgmtApp.searchTargetEntities(importRoot, query);
             return entities.size();
 
 //            PagingResultsIterator itr = new PagingResultsIterator( entities );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5b1dfa1c/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
index fd199e6..e8d6081 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
@@ -28,7 +28,6 @@ import org.apache.usergrid.ServiceITSetup;
 import org.apache.usergrid.ServiceITSetupImpl;
 import org.apache.usergrid.batch.JobExecution;
 import org.apache.usergrid.batch.service.JobSchedulerService;
-import org.apache.usergrid.cassandra.CassandraResource;
 import org.apache.usergrid.cassandra.ClearShiroSubject;
 import org.apache.usergrid.management.OrganizationInfo;
 import org.apache.usergrid.management.UserInfo;
@@ -39,7 +38,6 @@ import org.apache.usergrid.persistence.*;
 import org.apache.usergrid.persistence.entities.Import;
 import org.apache.usergrid.persistence.entities.JobData;
 import org.apache.usergrid.persistence.exceptions.EntityNotFoundException;
-import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
 import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.index.utils.UUIDUtils;
 import org.apache.usergrid.services.notifications.QueueListener;
@@ -248,7 +246,7 @@ public class ImportServiceIT {
                     Results r;
                     List<ConnectionRef> connections;
                     for (int i = 0; i < 2; i++) {
-                        r = em.getConnectedEntities(entities.get(i), "related", null, Level.IDS);
+                        r = em.getTargetEntities(entities.get(i), "related", null, Level.IDS);
                         connections = r.getConnections();
                         assertNotNull(connections);
                     }
@@ -359,7 +357,7 @@ public class ImportServiceIT {
                         Results r;
                         List<ConnectionRef> connections;
                         for (int i = 0; i < 2; i++) {
-                            r = em.getConnectedEntities(entities.get(i), "related", null, Level.IDS);
+                            r = em.getTargetEntities(entities.get(i), "related", null, Level.IDS);
                             connections = r.getConnections();
                             assertNotNull(connections);
                         }


Mime
View raw message