usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [9/9] incubator-usergrid git commit: Removed unused 1.0 files.
Date Thu, 09 Apr 2015 00:14:26 GMT
Removed unused 1.0 files.


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

Branch: refs/heads/USERGRID-536
Commit: f95d39c744bafecd8b141f62d69ab08a1975a55a
Parents: 654e19f
Author: Todd Nine <tnine@apigee.com>
Authored: Wed Apr 8 17:49:45 2015 -0600
Committer: Todd Nine <tnine@apigee.com>
Committed: Wed Apr 8 18:14:10 2015 -0600

----------------------------------------------------------------------
 .../batch/service/SchedulerService.java         |    2 +-
 .../batch/service/SchedulerServiceImpl.java     |    2 +-
 .../corepersistence/ApplicationIdCacheImpl.java |    2 +-
 .../corepersistence/CpEntityManager.java        |   20 +-
 .../corepersistence/CpEntityManagerFactory.java |    2 +-
 .../corepersistence/CpQueryProcessor.java       |   94 -
 .../corepersistence/CpRelationManager.java      |    4 +-
 .../events/EntityDeletedHandler.java            |    9 +-
 .../migration/AppInfoMigrationPlugin.java       |    2 +-
 .../CollectionResultsLoaderFactoryImpl.java     |    2 +-
 .../ConnectionResultsLoaderFactoryImpl.java     |    2 +-
 .../results/ElasticSearchQueryExecutor.java     |    2 +-
 .../results/ResultsLoaderFactory.java           |    2 +-
 .../main/java/org/apache/usergrid/mq/Query.java |    2 +-
 .../org/apache/usergrid/mq/QueryProcessor.java  |  210 +-
 .../usergrid/persistence/CounterQuery.java      |    2 +-
 .../usergrid/persistence/EntityManager.java     |   11 +-
 .../persistence/EntityPropertyComparator.java   |   56 -
 .../persistence/MultiQueryIterator.java         |    4 +-
 .../persistence/PagingResultsIterator.java      |    4 +-
 .../apache/usergrid/persistence/PathQuery.java  |    6 +-
 .../org/apache/usergrid/persistence/Query.java  |  872 ++++++
 .../apache/usergrid/persistence/QueryUtils.java |    2 +-
 .../usergrid/persistence/RelationManager.java   |    4 +-
 .../apache/usergrid/persistence/Results.java    |    5 +-
 .../persistence/cassandra/CassandraService.java |  304 +-
 .../persistence/cassandra/CursorCache.java      |  137 -
 .../cassandra/EntityManagerFactoryImpl.java     |  481 ---
 .../cassandra/EntityManagerImpl.java            | 2916 ------------------
 .../cassandra/EntityValueSerializer.java        |   53 -
 .../persistence/cassandra/GeoIndexManager.java  |  330 --
 .../persistence/cassandra/IndexUpdate.java      |  451 ---
 .../persistence/cassandra/QueryProcessor.java   |   60 -
 .../cassandra/QueryProcessorImpl.java           |  727 -----
 .../cassandra/RelationManagerImpl.java          | 2298 --------------
 .../persistence/cassandra/SetupImpl.java        |  168 -
 .../cassandra/SimpleIndexBucketLocatorImpl.java |  122 -
 .../cassandra/index/ConnectedIndexScanner.java  |  280 --
 .../cassandra/index/IndexBucketScanner.java     |  238 --
 .../index/IndexMultiBucketSetLoader.java        |  139 -
 .../cassandra/index/IndexScanner.java           |   40 -
 .../cassandra/index/NoOpIndexScanner.java       |   95 -
 .../persistence/geo/CollectionGeoSearch.java    |   68 -
 .../persistence/geo/ConnectionGeoSearch.java    |   67 -
 .../persistence/geo/EntityLocationRef.java      |  227 --
 .../EntityLocationRefDistanceComparator.java    |   78 -
 .../persistence/geo/GeoIndexSearcher.java       |  370 ---
 .../persistence/geo/GeocellManager.java         |  195 --
 .../usergrid/persistence/geo/GeocellUtils.java  |  543 ----
 .../geo/comparator/DoubleTupleComparator.java   |   39 -
 .../persistence/geo/model/BoundingBox.java      |   74 -
 .../persistence/geo/model/CostFunction.java     |   36 -
 .../geo/model/DefaultCostFunction.java          |   37 -
 .../usergrid/persistence/geo/model/Point.java   |   61 -
 .../usergrid/persistence/geo/model/Tuple.java   |   40 -
 .../usergrid/persistence/query/ir/AllNode.java  |   82 -
 .../usergrid/persistence/query/ir/AndNode.java  |   44 -
 .../persistence/query/ir/BooleanNode.java       |   65 -
 .../query/ir/EmailIdentifierNode.java           |   58 -
 .../query/ir/NameIdentifierNode.java            |   56 -
 .../persistence/query/ir/NodeVisitor.java       |   79 -
 .../usergrid/persistence/query/ir/NotNode.java  |   75 -
 .../usergrid/persistence/query/ir/OrNode.java   |   53 -
 .../persistence/query/ir/OrderByNode.java       |  105 -
 .../persistence/query/ir/QueryNode.java         |   41 -
 .../persistence/query/ir/QuerySlice.java        |  345 ---
 .../persistence/query/ir/SearchVisitor.java     |  270 --
 .../persistence/query/ir/SliceNode.java         |  180 --
 .../query/ir/UuidIdentifierNode.java            |   60 -
 .../persistence/query/ir/WithinNode.java        |  109 -
 .../query/ir/result/AbstractScanColumn.java     |   83 -
 .../result/CollectionResultsLoaderFactory.java  |   41 -
 .../ir/result/ConnectionIndexSliceParser.java   |   87 -
 .../query/ir/result/ConnectionRefLoader.java    |   81 -
 .../result/ConnectionResultsLoaderFactory.java  |   50 -
 .../ir/result/ConnectionTypesIterator.java      |  190 --
 .../query/ir/result/EmptyIterator.java          |   63 -
 .../query/ir/result/EntityRefLoader.java        |   51 -
 .../query/ir/result/EntityResultsLoader.java    |   47 -
 .../query/ir/result/GeoIterator.java            |  351 ---
 .../persistence/query/ir/result/IDLoader.java   |   40 -
 .../query/ir/result/IntersectionIterator.java   |  170 -
 .../query/ir/result/MergeIterator.java          |  150 -
 .../query/ir/result/MultiIterator.java          |   55 -
 .../query/ir/result/OrderByIterator.java        |  250 --
 .../query/ir/result/ResultIterator.java         |   44 -
 .../query/ir/result/ResultsLoader.java          |   30 -
 .../query/ir/result/ResultsLoaderFactory.java   |   37 -
 .../persistence/query/ir/result/ScanColumn.java |   32 -
 .../query/ir/result/ScanColumnTransformer.java  |   39 -
 .../ir/result/SecondaryIndexSliceParser.java    |   61 -
 .../query/ir/result/SliceIterator.java          |  242 --
 .../query/ir/result/SliceParser.java            |   32 -
 .../query/ir/result/StaticIdIterator.java       |   82 -
 .../query/ir/result/SubtractionIterator.java    |  113 -
 .../query/ir/result/UUIDIndexSliceParser.java   |   47 -
 .../query/ir/result/UnionIterator.java          |  264 --
 97 files changed, 988 insertions(+), 15363 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java
index cfbfae4..a4e29e5 100644
--- a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerService.java
@@ -19,7 +19,7 @@ package org.apache.usergrid.batch.service;
 
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.persistence.Results;
 import org.apache.usergrid.persistence.entities.JobData;
 import org.apache.usergrid.persistence.entities.JobStat;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java
index 6e6564e..f3fab9e 100644
--- a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java
@@ -37,7 +37,7 @@ import org.apache.usergrid.mq.QueueResults;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.index.EntityIndex;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.persistence.Results;
 import org.apache.usergrid.persistence.Schema;
 import org.apache.usergrid.persistence.SimpleEntityRef;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheImpl.java
index 379f306..5f85080 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/ApplicationIdCacheImpl.java
@@ -30,7 +30,7 @@ import com.google.common.base.Optional;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.utils.UUIDUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 5647d18..e7159f9 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
@@ -33,10 +33,6 @@ import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.UUID;
 
-import com.codahale.metrics.Meter;
-import org.apache.usergrid.persistence.collection.FieldSet;
-import org.apache.usergrid.persistence.core.future.BetterFuture;
-import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.util.Assert;
@@ -54,6 +50,8 @@ import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.EntityRef;
 import org.apache.usergrid.persistence.IndexBucketLocator;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.RelationManager;
 import org.apache.usergrid.persistence.Results;
 import org.apache.usergrid.persistence.Schema;
@@ -65,7 +63,6 @@ import org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils;
 import org.apache.usergrid.persistence.cassandra.CassandraService;
 import org.apache.usergrid.persistence.cassandra.ConnectionRefImpl;
 import org.apache.usergrid.persistence.cassandra.CounterUtils;
-import org.apache.usergrid.persistence.cassandra.GeoIndexManager;
 import org.apache.usergrid.persistence.cassandra.util.TraceParticipant;
 import org.apache.usergrid.persistence.collection.EntityCollectionManager;
 import org.apache.usergrid.persistence.collection.FieldSet;
@@ -84,11 +81,8 @@ import org.apache.usergrid.persistence.exceptions.RequiredPropertyNotFoundExcept
 import org.apache.usergrid.persistence.exceptions.UnexpectedEntityTypeException;
 import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexBatch;
-import org.apache.usergrid.persistence.index.IndexScope;
 import org.apache.usergrid.persistence.index.query.CounterResolution;
 import org.apache.usergrid.persistence.index.query.Identifier;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.index.query.Query.Level;
 import org.apache.usergrid.persistence.map.MapManager;
 import org.apache.usergrid.persistence.map.MapScope;
 import org.apache.usergrid.persistence.model.entity.Id;
@@ -689,12 +683,6 @@ public class CpEntityManager implements EntityManager {
     //    }
 
 
-    @Override
-    public GeoIndexManager getGeoIndexManager() {
-
-        throw new UnsupportedOperationException( "GeoIndexManager no longer supported." );
-    }
-
 
     @Override
     public EntityRef getApplicationRef() {
@@ -1923,7 +1911,7 @@ public class CpEntityManager implements EntityManager {
     @Override
     public EntityRef getGroupRoleRef( UUID groupId, String roleName ) throws Exception {
         Results results = this.searchCollection( new SimpleEntityRef( Group.ENTITY_TYPE, groupId ),
-                Schema.defaultCollectionName( Role.ENTITY_TYPE ), Query.findForProperty( "roleName", roleName ) );
+                Schema.defaultCollectionName( Role.ENTITY_TYPE ), Query.fromQL( "roleName = '" + roleName + "'" ) );
         Iterator<Entity> iterator = results.iterator();
         EntityRef roleRef = null;
         while ( iterator.hasNext() ) {
@@ -1935,7 +1923,7 @@ public class CpEntityManager implements EntityManager {
 
     private EntityRef getRoleRef( String roleName ) throws Exception {
         Results results = this.searchCollection( new SimpleEntityRef( Application.ENTITY_TYPE, applicationId ),
-            Schema.defaultCollectionName( Role.ENTITY_TYPE ), Query.findForProperty( "roleName", roleName ) );
+            Schema.defaultCollectionName( Role.ENTITY_TYPE ), Query.fromQL( "roleName = '" + roleName + "'" ));
         Iterator<Entity> iterator = results.iterator();
         EntityRef roleRef = null;
         while ( iterator.hasNext() ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 07c0b40..c2988bf 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
@@ -62,7 +62,7 @@ import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
 import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.persistence.model.entity.Id;
 import org.apache.usergrid.persistence.model.entity.SimpleId;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpQueryProcessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpQueryProcessor.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpQueryProcessor.java
deleted file mode 100644
index 16d4085..0000000
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpQueryProcessor.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2014 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.usergrid.corepersistence;
-
-import java.nio.ByteBuffer;
-import org.apache.usergrid.persistence.EntityManager;
-import org.apache.usergrid.persistence.EntityRef;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.Results;
-import org.apache.usergrid.persistence.cassandra.QueryProcessor;
-import org.apache.usergrid.persistence.query.ir.QueryNode;
-import org.apache.usergrid.persistence.query.ir.QuerySlice;
-import org.apache.usergrid.persistence.query.ir.SearchVisitor;
-import org.apache.usergrid.persistence.schema.CollectionInfo;
-
-
-public class CpQueryProcessor implements QueryProcessor {
-
-    Query query;
-    EntityManager em;
-    EntityRef entityRef;
-    String collectionName;
-
-
-    public CpQueryProcessor( 
-            EntityManager em, Query query, EntityRef entityRef, String collectionName ) {
-
-        this.em = em;
-        this.query = query;
-        this.entityRef = entityRef;
-        this.collectionName = collectionName;
-    }
-
-    @Override
-    public void applyCursorAndSort(QuerySlice slice) {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public CollectionInfo getCollectionInfo() {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public ByteBuffer getCursorCache(int nodeId) {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public EntityManager getEntityManager() {
-        return em;
-    }
-
-    @Override
-    public QueryNode getFirstNode() {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public int getPageSizeHint(QueryNode node) {
-        throw new UnsupportedOperationException("Not supported yet."); 
-    }
-
-    @Override
-    public Query getQuery() {
-        return query;
-    }
-
-    @Override
-    public Results getResults(SearchVisitor visitor) throws Exception {
-        return em.searchCollection( entityRef, collectionName, query);
-    }
-
-    @Override
-    public void setQuery(Query query) {
-        this.query = query;
-    }
-
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 b76f38f..bb9928a 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
@@ -80,8 +80,8 @@ import org.apache.usergrid.persistence.index.EntityIndexBatch;
 import org.apache.usergrid.persistence.index.IndexScope;
 import org.apache.usergrid.persistence.index.SearchTypes;
 import org.apache.usergrid.persistence.index.query.Identifier;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.index.query.Query.Level;
+import org.apache.usergrid.persistence.Query;
+import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.model.entity.Id;
 import org.apache.usergrid.persistence.model.entity.SimpleId;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/events/EntityDeletedHandler.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/events/EntityDeletedHandler.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/events/EntityDeletedHandler.java
index 57d69bc..6a37144 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/events/EntityDeletedHandler.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/events/EntityDeletedHandler.java
@@ -20,20 +20,13 @@ package org.apache.usergrid.corepersistence.events;
 
 import java.util.UUID;
 
-import org.apache.usergrid.exception.NotImplementedException;
-import org.apache.usergrid.persistence.core.scope.ApplicationScope;
-import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.corepersistence.CpEntityManagerFactory;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.collection.event.EntityDeleted;
-import org.apache.usergrid.persistence.index.EntityIndex;
-import org.apache.usergrid.persistence.index.IndexScope;
-import org.apache.usergrid.persistence.index.impl.IndexScopeImpl;
+import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.model.entity.Id;
-import org.apache.usergrid.persistence.model.entity.SimpleId;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
index 53ffe79..8490d27 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
@@ -36,7 +36,7 @@ import org.apache.usergrid.persistence.graph.GraphManager;
 import org.apache.usergrid.persistence.graph.GraphManagerFactory;
 import org.apache.usergrid.persistence.graph.SearchByEdgeType;
 import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import org.apache.usergrid.persistence.model.entity.*;
 import org.apache.usergrid.utils.UUIDUtils;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/CollectionResultsLoaderFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/CollectionResultsLoaderFactoryImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/CollectionResultsLoaderFactoryImpl.java
index b79700b..2f6f96d 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/CollectionResultsLoaderFactoryImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/CollectionResultsLoaderFactoryImpl.java
@@ -23,7 +23,7 @@ package org.apache.usergrid.corepersistence.results;
 import org.apache.usergrid.corepersistence.ManagerCache;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.index.IndexScope;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ConnectionResultsLoaderFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ConnectionResultsLoaderFactoryImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ConnectionResultsLoaderFactoryImpl.java
index ba8eb2c..876cf92 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ConnectionResultsLoaderFactoryImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ConnectionResultsLoaderFactoryImpl.java
@@ -24,7 +24,7 @@ import org.apache.usergrid.corepersistence.ManagerCache;
 import org.apache.usergrid.persistence.EntityRef;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.index.IndexScope;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java
index 6f01819..ae2e350 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ElasticSearchQueryExecutor.java
@@ -33,7 +33,7 @@ import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.IndexScope;
 import org.apache.usergrid.persistence.index.SearchTypes;
 import org.apache.usergrid.persistence.index.query.CandidateResults;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 
 
 public class ElasticSearchQueryExecutor implements QueryExecutor {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ResultsLoaderFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ResultsLoaderFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ResultsLoaderFactory.java
index 3fbfff9..12589e2 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ResultsLoaderFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/results/ResultsLoaderFactory.java
@@ -23,7 +23,7 @@ package org.apache.usergrid.corepersistence.results;
 import org.apache.usergrid.persistence.EntityRef;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.index.IndexScope;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/mq/Query.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/Query.java b/stack/core/src/main/java/org/apache/usergrid/mq/Query.java
index 05cc9a8..674695c 100644
--- a/stack/core/src/main/java/org/apache/usergrid/mq/Query.java
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/Query.java
@@ -49,7 +49,7 @@ import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
 import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
 import org.apache.usergrid.persistence.index.query.CounterResolution;
 import org.apache.usergrid.persistence.index.query.Identifier;
-import org.apache.usergrid.persistence.index.query.Query.Level;
+import org.apache.usergrid.persistence.Query.Level;
 import static org.apache.usergrid.utils.ClassUtils.cast;
 import static org.apache.usergrid.utils.ConversionUtils.uuid;
 import static org.apache.usergrid.utils.ListUtils.first;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java b/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java
index b562ae2..3e02b83 100644
--- a/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java
+++ b/stack/core/src/main/java/org/apache/usergrid/mq/QueryProcessor.java
@@ -22,32 +22,20 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.LinkedHashSet;
 import java.util.List;
-import java.util.ListIterator;
 import java.util.Set;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
+import org.apache.commons.collections.comparators.ComparatorChain;
+
 import org.apache.usergrid.mq.Query.FilterOperator;
 import org.apache.usergrid.mq.Query.FilterPredicate;
 import org.apache.usergrid.mq.Query.SortPredicate;
 import org.apache.usergrid.persistence.Entity;
-import org.apache.usergrid.persistence.EntityPropertyComparator;
-import org.apache.usergrid.utils.ListUtils;
 import org.apache.usergrid.utils.NumberUtils;
-import org.apache.usergrid.utils.StringUtils;
 
-import org.apache.commons.collections.comparators.ComparatorChain;
-
-import static java.lang.Integer.parseInt;
-
-import static org.apache.commons.codec.binary.Base64.decodeBase64;
-import static org.apache.commons.lang.StringUtils.isBlank;
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.apache.commons.lang.StringUtils.removeEnd;
-import static org.apache.commons.lang.StringUtils.split;
 import static org.apache.usergrid.mq.Query.SortDirection.DESCENDING;
-import static org.apache.usergrid.persistence.cassandra.IndexUpdate.indexValueCode;
-import static org.apache.usergrid.persistence.cassandra.IndexUpdate.toIndexableValue;
 
 
 public class QueryProcessor {
@@ -99,89 +87,91 @@ public class QueryProcessor {
     private void process() {
         slices = new ArrayList<QuerySlice>();
 
-        // consolidate all the filters into a set of ranges
-        Set<String> names = getFilterPropertyNames();
-        for ( String name : names ) {
-            FilterOperator operator = null;
-            Object value = null;
-            RangeValue start = null;
-            RangeValue finish = null;
-            for ( FilterPredicate f : filters ) {
-                if ( f.getPropertyName().equals( name ) ) {
-                    operator = f.getOperator();
-                    value = f.getValue();
-                    RangePair r = getRangeForFilter( f );
-                    if ( r.start != null ) {
-                        if ( ( start == null ) || ( r.start.compareTo( start, false ) < 0 ) ) {
-                            start = r.start;
-                        }
-                    }
-                    if ( r.finish != null ) {
-                        if ( ( finish == null ) || ( r.finish.compareTo( finish, true ) > 0 ) ) {
-                            finish = r.finish;
-                        }
-                    }
-                }
-            }
-            slices.add( new QuerySlice( name, operator, value, start, finish, null, false ) );
-        }
-
-        // process sorts
-        if ( ( slices.size() == 0 ) && ( sorts.size() > 0 ) ) {
-            // if no filters, turn first filter into a sort
-            SortPredicate sort = ListUtils.dequeue( sorts );
-            slices.add( new QuerySlice( sort.getPropertyName(), null, null, null, null, null,
-                    sort.getDirection() == DESCENDING ) );
-        }
-        else if ( sorts.size() > 0 ) {
-            // match up sorts with existing filters
-            for ( ListIterator<SortPredicate> iter = sorts.listIterator(); iter.hasNext(); ) {
-                SortPredicate sort = iter.next();
-                QuerySlice slice = getSliceForProperty( sort.getPropertyName() );
-                if ( slice != null ) {
-                    slice.reversed = sort.getDirection() == DESCENDING;
-                    iter.remove();
-                }
-            }
-        }
-
-        // attach cursors to slices
-        if ( ( cursor != null ) && ( cursor.indexOf( ':' ) >= 0 ) ) {
-            String[] cursors = split( cursor, '|' );
-            for ( String c : cursors ) {
-                String[] parts = split( c, ':' );
-                if ( parts.length == 2 ) {
-                    int cursorHashCode = parseInt( parts[0] );
-                    for ( QuerySlice slice : slices ) {
-                        int sliceHashCode = slice.hashCode();
-                        logger.info( "Comparing cursor hashcode " + cursorHashCode + " to " + sliceHashCode );
-                        if ( sliceHashCode == cursorHashCode ) {
-                            if ( isNotBlank( parts[1] ) ) {
-                                ByteBuffer cursorBytes = ByteBuffer.wrap( decodeBase64( parts[1] ) );
-                                slice.setCursor( cursorBytes );
-                            }
-                        }
-                    }
-                }
-            }
-        }
+        throw new UnsupportedOperationException( "query not supported" );
+//        // consolidate all the filters into a set of ranges
+//        Set<String> names = getFilterPropertyNames();
+//        for ( String name : names ) {
+//            FilterOperator operator = null;
+//            Object value = null;
+//            RangeValue start = null;
+//            RangeValue finish = null;
+//            for ( FilterPredicate f : filters ) {
+//                if ( f.getPropertyName().equals( name ) ) {
+//                    operator = f.getOperator();
+//                    value = f.getValue();
+//                    RangePair r = getRangeForFilter( f );
+//                    if ( r.start != null ) {
+//                        if ( ( start == null ) || ( r.start.compareTo( start, false ) < 0 ) ) {
+//                            start = r.start;
+//                        }
+//                    }
+//                    if ( r.finish != null ) {
+//                        if ( ( finish == null ) || ( r.finish.compareTo( finish, true ) > 0 ) ) {
+//                            finish = r.finish;
+//                        }
+//                    }
+//                }
+//            }
+//            slices.add( new QuerySlice( name, operator, value, start, finish, null, false ) );
+//        }
+//
+//        // process sorts
+//        if ( ( slices.size() == 0 ) && ( sorts.size() > 0 ) ) {
+//            // if no filters, turn first filter into a sort
+//            SortPredicate sort = ListUtils.dequeue( sorts );
+//            slices.add( new QuerySlice( sort.getPropertyName(), null, null, null, null, null,
+//                    sort.getDirection() == DESCENDING ) );
+//        }
+//        else if ( sorts.size() > 0 ) {
+//            // match up sorts with existing filters
+//            for ( ListIterator<SortPredicate> iter = sorts.listIterator(); iter.hasNext(); ) {
+//                SortPredicate sort = iter.next();
+//                QuerySlice slice = getSliceForProperty( sort.getPropertyName() );
+//                if ( slice != null ) {
+//                    slice.reversed = sort.getDirection() == DESCENDING;
+//                    iter.remove();
+//                }
+//            }
+//        }
+//
+//        // attach cursors to slices
+//        if ( ( cursor != null ) && ( cursor.indexOf( ':' ) >= 0 ) ) {
+//            String[] cursors = split( cursor, '|' );
+//            for ( String c : cursors ) {
+//                String[] parts = split( c, ':' );
+//                if ( parts.length == 2 ) {
+//                    int cursorHashCode = parseInt( parts[0] );
+//                    for ( QuerySlice slice : slices ) {
+//                        int sliceHashCode = slice.hashCode();
+//                        logger.info( "Comparing cursor hashcode " + cursorHashCode + " to " + sliceHashCode );
+//                        if ( sliceHashCode == cursorHashCode ) {
+//                            if ( isNotBlank( parts[1] ) ) {
+//                                ByteBuffer cursorBytes = ByteBuffer.wrap( decodeBase64( parts[1] ) );
+//                                slice.setCursor( cursorBytes );
+//                            }
+//                        }
+//                    }
+//                }
+//            }
+//        }
     }
 
 
     @SuppressWarnings("unchecked")
     public List<Entity> sort( List<Entity> entities ) {
-
-        if ( ( entities != null ) && ( sorts.size() > 0 ) ) {
-            // Performing in memory sort
-            logger.info( "Performing in-memory sort of {} entities", entities.size() );
-            ComparatorChain chain = new ComparatorChain();
-            for ( SortPredicate sort : sorts ) {
-                chain.addComparator(
-                        new EntityPropertyComparator( sort.getPropertyName(), sort.getDirection() == DESCENDING ) );
-            }
-            Collections.sort( entities, chain );
-        }
-        return entities;
+        throw new UnsupportedOperationException( "Unsupported" );
+//
+//        if ( ( entities != null ) && ( sorts.size() > 0 ) ) {
+//            // Performing in memory sort
+//            logger.info( "Performing in-memory sort of {} entities", entities.size() );
+//            ComparatorChain chain = new ComparatorChain();
+//            for ( SortPredicate sort : sorts ) {
+//                chain.addComparator(
+//                        new EntityPropertyComparator( sort.getPropertyName(), sort.getDirection() == DESCENDING ) );
+//            }
+//            Collections.sort( entities, chain );
+//        }
+//        return entities;
     }
 
 
@@ -401,40 +391,6 @@ public class QueryProcessor {
     }
 
 
-    public RangePair getRangeForFilter( FilterPredicate f ) {
-        Object searchStartValue = toIndexableValue( f.getStartValue() );
-        Object searchFinishValue = toIndexableValue( f.getFinishValue() );
-        if ( StringUtils.isString( searchStartValue ) && StringUtils.isStringOrNull( searchFinishValue ) ) {
-            if ( "*".equals( searchStartValue ) ) {
-                searchStartValue = null;
-            }
-            if ( searchFinishValue == null ) {
-                searchFinishValue = searchStartValue;
-            }
-            if ( ( searchStartValue != null ) && searchStartValue.toString().endsWith( "*" ) ) {
-                searchStartValue = removeEnd( searchStartValue.toString(), "*" );
-                searchFinishValue = searchStartValue + "\uFFFF";
-                if ( isBlank( searchStartValue.toString() ) ) {
-                    searchStartValue = "\0000";
-                }
-            }
-            else if ( searchFinishValue != null ) {
-                searchFinishValue = searchFinishValue + "\u0000";
-            }
-        }
-        RangeValue rangeStart = null;
-        if ( searchStartValue != null ) {
-            rangeStart = new RangeValue( indexValueCode( searchStartValue ), searchStartValue,
-                    f.getOperator() != FilterOperator.GREATER_THAN );
-        }
-        RangeValue rangeFinish = null;
-        if ( searchFinishValue != null ) {
-            rangeFinish = new RangeValue( indexValueCode( searchFinishValue ), searchFinishValue,
-                    f.getOperator() != FilterOperator.LESS_THAN );
-        }
-        return new RangePair( rangeStart, rangeFinish );
-    }
-
 
     public static class QuerySlice {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java b/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java
index 9e604cd..c0f3a49 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/CounterQuery.java
@@ -24,7 +24,7 @@ import org.apache.usergrid.persistence.index.query.CounterResolution;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.index.query.Query.CounterFilterPredicate;
+import org.apache.usergrid.persistence.Query.CounterFilterPredicate;
 import org.apache.usergrid.utils.JsonUtils;
 import static org.apache.usergrid.utils.ClassUtils.cast;
 import static org.apache.usergrid.utils.ListUtils.firstBoolean;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 83f1973..fdae4df 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
@@ -17,24 +17,21 @@
 package org.apache.usergrid.persistence;
 
 
-import org.apache.usergrid.persistence.index.EntityIndex;
-import org.apache.usergrid.persistence.index.query.Query;
 import java.nio.ByteBuffer;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-import me.prettyprint.hector.api.mutation.Mutator;
 
+import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.persistence.cassandra.CassandraService;
-import org.apache.usergrid.persistence.cassandra.GeoIndexManager;
-import org.apache.usergrid.persistence.core.util.Health;
 import org.apache.usergrid.persistence.entities.Application;
 import org.apache.usergrid.persistence.entities.Role;
 import org.apache.usergrid.persistence.index.query.CounterResolution;
 import org.apache.usergrid.persistence.index.query.Identifier;
-import org.apache.usergrid.persistence.index.query.Query.Level;
+
+import me.prettyprint.hector.api.mutation.Mutator;
 
 
 /**
@@ -45,8 +42,6 @@ public interface EntityManager {
 
 //    public void setApplicationId( UUID applicationId );
 
-    public GeoIndexManager getGeoIndexManager();
-
     public EntityRef getApplicationRef();
 
     public Application getApplication() throws Exception;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/EntityPropertyComparator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityPropertyComparator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityPropertyComparator.java
deleted file mode 100644
index f91477a..0000000
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityPropertyComparator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.persistence;
-
-
-import java.util.Comparator;
-
-import static org.apache.usergrid.persistence.cassandra.IndexUpdate.compareIndexedValues;
-
-
-public class EntityPropertyComparator implements Comparator<Entity> {
-
-    final String propertyName;
-    final int reverse;
-
-
-    public EntityPropertyComparator( String propertyName, boolean reverse ) {
-        this.propertyName = propertyName;
-        this.reverse = reverse ? -1 : 1;
-    }
-
-
-    @Override
-    public int compare( Entity e1, Entity e2 ) {
-
-        if ( e1 == null ) {
-            //second one is not null and first is, second is larger
-            if ( e2 != null ) {
-                return 1;
-            }
-            else {
-                return 0;
-            }
-        }
-        //first one is not null, second is
-        else if ( e2 == null ) {
-            return -1;
-        }
-
-        return compareIndexedValues( e1.getProperty( propertyName ), e2.getProperty( propertyName ) ) * reverse;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 52e235c..c32f429 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,10 @@
 package org.apache.usergrid.persistence;
 
 
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import java.util.Iterator;
 import java.util.UUID;
-import org.apache.usergrid.persistence.index.query.Query.Level;
+import org.apache.usergrid.persistence.Query.Level;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java
index 183cc30..a883e1b 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/PagingResultsIterator.java
@@ -19,9 +19,7 @@ package org.apache.usergrid.persistence;
 
 import java.util.Iterator;
 import java.util.List;
-import org.apache.usergrid.persistence.index.query.Query.Level;
-import static org.apache.usergrid.persistence.index.query.Query.Level.IDS;
-import static org.apache.usergrid.persistence.index.query.Query.Level.REFS;
+import org.apache.usergrid.persistence.Query.Level;
 
 
 /** iterates over a Results object, crossing page boundaries automatically */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 6d252fd..58b9522 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,11 +17,11 @@
 package org.apache.usergrid.persistence;
 
 
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import java.util.Iterator;
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.index.query.Query.Level;
+import org.apache.usergrid.persistence.Query.Level;
 
 
 public class PathQuery<E> {
@@ -101,7 +101,7 @@ public class PathQuery<E> {
 
     protected Results getHeadResults( EntityManager em ) throws Exception {
         EntityRef ref = new SimpleEntityRef(type,uuid);
-        return ( query.getCollection() != null ) ? 
+        return ( query.getCollection() != null ) ?
                em.searchCollection( ref, query.getCollection(), query ) :
                em.searchConnectedEntities( ref, query );
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java
new file mode 100644
index 0000000..66152d4
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Query.java
@@ -0,0 +1,872 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.usergrid.persistence;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.UUID;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.ClassicToken;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.Token;
+import org.antlr.runtime.TokenRewriteStream;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang.StringUtils;
+import org.apache.usergrid.persistence.index.exceptions.IndexException;
+import org.apache.usergrid.persistence.index.exceptions.QueryParseException;
+import org.apache.usergrid.persistence.index.impl.EsQueryVistor;
+import org.apache.usergrid.persistence.index.impl.IndexingUtils;
+import org.apache.usergrid.persistence.index.query.CounterResolution;
+import org.apache.usergrid.persistence.index.query.Identifier;
+import org.apache.usergrid.persistence.index.query.tree.AndOperand;
+import org.apache.usergrid.persistence.index.query.tree.ContainsOperand;
+import org.apache.usergrid.persistence.index.query.tree.CpQueryFilterLexer;
+import org.apache.usergrid.persistence.index.query.tree.CpQueryFilterParser;
+import org.apache.usergrid.persistence.index.query.tree.Equal;
+import org.apache.usergrid.persistence.index.query.tree.EqualityOperand;
+import org.apache.usergrid.persistence.index.query.tree.GreaterThan;
+import org.apache.usergrid.persistence.index.query.tree.GreaterThanEqual;
+import org.apache.usergrid.persistence.index.query.tree.LessThan;
+import org.apache.usergrid.persistence.index.query.tree.LessThanEqual;
+import org.apache.usergrid.persistence.index.query.tree.Operand;
+import org.apache.usergrid.persistence.index.query.tree.QueryVisitor;
+import org.apache.usergrid.persistence.index.utils.ClassUtils;
+import org.apache.usergrid.persistence.index.utils.ConversionUtils;
+import org.apache.usergrid.persistence.index.utils.ListUtils;
+import org.apache.usergrid.persistence.index.utils.MapUtils;
+import org.elasticsearch.index.query.FilterBuilder;
+import org.elasticsearch.index.query.QueryBuilder;
+import org.elasticsearch.index.query.QueryBuilders;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+public class Query {
+    private static final Logger logger = LoggerFactory.getLogger( Query.class );
+
+    public enum Level {
+        IDS, REFS, CORE_PROPERTIES, ALL_PROPERTIES, LINKED_PROPERTIES
+    }
+
+    public static final int DEFAULT_LIMIT = 10;
+
+    public static final int MAX_LIMIT = 1000;
+
+    public static final String PROPERTY_UUID = "uuid";
+
+    private String type;
+    private Operand rootOperand;
+    private UUID startResult;
+    private String cursor;
+    private int limit = 0;
+
+    private boolean mergeSelectResults = false;
+    private Level level = Level.ALL_PROPERTIES;
+    private String connectionType;
+    private List<String> permissions;
+    private boolean reversed;
+    private boolean reversedSet = false;
+    private Long startTime;
+    private Long finishTime;
+    private boolean pad;
+    private CounterResolution resolution = CounterResolution.ALL;
+    private List<Identifier> identifiers;
+    private List<CounterFilterPredicate> counterFilters;
+    private String collection;
+    private String ql;
+
+    private static ObjectMapper mapper = new ObjectMapper();
+
+
+    List<Operand> filterClauses = new ArrayList<Operand>();
+
+    public Query() {
+    }
+
+
+    /**
+     * Creates a deep copy of a query from another query
+     * @param q
+     */
+    public Query( Query q ) {
+        if ( q == null ) {
+            return;
+        }
+
+        type = q.type;
+        startResult = q.startResult;
+        cursor = q.cursor;
+        limit = q.limit;
+        mergeSelectResults = q.mergeSelectResults;
+        //level = q.level;
+        connectionType = q.connectionType;
+        permissions = q.permissions != null ? new ArrayList<>( q.permissions ) : null;
+        reversed = q.reversed;
+        reversedSet = q.reversedSet;
+        startTime = q.startTime;
+        finishTime = q.finishTime;
+        resolution = q.resolution;
+        pad = q.pad;
+        rootOperand = q.rootOperand;
+        identifiers = q.identifiers != null
+                ? new ArrayList<>( q.identifiers ) : null;
+        counterFilters = q.counterFilters != null
+                ? new ArrayList<>( q.counterFilters ) : null;
+        collection = q.collection;
+        level = q.level;
+
+    }
+
+
+
+    /**
+     * Create a query instance from the QL.  If the string is null, return an empty query
+     * @param ql
+     * @return
+     */
+    public static Query fromQLNullSafe(final String ql){
+        final Query query = fromQL(ql);
+
+        if(query != null){
+            return query;
+        }
+
+        return new Query();
+    }
+
+    public static Query fromQL( String ql ) throws QueryParseException {
+        if ( StringUtils.isEmpty(ql) ) {
+            return null;
+        }
+
+        Query query = new Query(  );
+        query.setQl( ql );
+
+        return query;
+    }
+
+
+    private static Query newQueryIfNull( Query query ) {
+        if ( query == null ) {
+            query = new Query();
+        }
+        return query;
+    }
+
+
+    public static Query fromJsonString( String json ) throws QueryParseException {
+
+        Object o;
+        try {
+            o = mapper.readValue( json, Object.class );
+        } catch (IOException ex) {
+            throw new QueryParseException("Error parsing JSON query string " + json, ex);
+        }
+
+        if ( o instanceof Map ) {
+            @SuppressWarnings({ "unchecked", "rawtypes" }) Map<String, List<String>> params =
+                    ClassUtils.cast( MapUtils.toMapList( ( Map ) o ) );
+            return fromQueryParams( params );
+        }
+        return null;
+    }
+
+
+    public static Query fromQueryParams( Map<String, List<String>> params )
+            throws QueryParseException {
+        Query q = null;
+        CounterResolution resolution = null;
+        List<Identifier> identifiers = null;
+        List<CounterFilterPredicate> counterFilters = null;
+
+        String ql = QueryUtils.queryStrFrom( params );
+        String type = ListUtils.first( params.get( "type" ) );
+        Boolean reversed = ListUtils.firstBoolean( params.get( "reversed" ) );
+        String connection = ListUtils.first( params.get( "connectionType" ) );
+        UUID start = ListUtils.firstUuid( params.get( "start" ) );
+        String cursor = ListUtils.first( params.get( "cursor" ) );
+        Integer limit = ListUtils.firstInteger( params.get( "limit" ) );
+        List<String> permissions = params.get( "permission" );
+        Long startTime = ListUtils.firstLong( params.get( "start_time" ) );
+        Long finishTime = ListUtils.firstLong( params.get( "end_time" ) );
+
+        List<String> l = params.get( "resolution" );
+        if ( !ListUtils.isEmpty( l ) ) {
+            resolution = CounterResolution.fromString( l.get( 0 ) );
+        }
+
+        l = params.get( "counter" );
+
+        if ( !ListUtils.isEmpty( l ) ) {
+            counterFilters = CounterFilterPredicate.fromList( l );
+        }
+
+        Boolean pad = ListUtils.firstBoolean( params.get( "pad" ) );
+
+        for ( Entry<String, List<String>> param : params.entrySet() ) {
+            Identifier identifier = Identifier.from( param.getKey() );
+            if ( ( param.getValue() == null ) || ( param.getValue().size() == 0 ) || identifier.isUUID() ) {
+                if ( identifier != null ) {
+                    if ( identifiers == null ) {
+                        identifiers = new ArrayList<Identifier>();
+                    }
+                    identifiers.add( identifier );
+                }
+            }
+        }
+
+        if ( ql != null ) {
+            q = Query.fromQL( decode( ql ) );
+        }
+
+
+        if ( type != null ) {
+            q = newQueryIfNull( q );
+            q.setEntityType( type );
+        }
+
+        if ( connection != null ) {
+            q = newQueryIfNull( q );
+            q.setConnectionType( connection );
+        }
+
+        if ( permissions != null ) {
+            q = newQueryIfNull( q );
+            q.setPermissions( permissions );
+        }
+
+        if ( start != null ) {
+            q = newQueryIfNull( q );
+            q.setStartResult( start );
+        }
+
+        if ( cursor != null ) {
+            q = newQueryIfNull( q );
+            q.setCursor( cursor );
+        }
+
+        if ( limit != null ) {
+            q = newQueryIfNull( q );
+            q.setLimit( limit );
+        }
+
+        if ( startTime != null ) {
+            q = newQueryIfNull( q );
+            q.setStartTime( startTime );
+        }
+
+        if ( finishTime != null ) {
+            q = newQueryIfNull( q );
+            q.setFinishTime( finishTime );
+        }
+
+        if ( resolution != null ) {
+            q = newQueryIfNull( q );
+            q.setResolution( resolution );
+        }
+
+        if ( counterFilters != null ) {
+            q = newQueryIfNull( q );
+            q.setCounterFilters( counterFilters );
+        }
+
+        if ( pad != null ) {
+            q = newQueryIfNull( q );
+            q.setPad( pad );
+        }
+
+        if ( identifiers != null ) {
+            q = newQueryIfNull( q );
+            q.setIdentifiers( identifiers );
+        }
+
+        if ( reversed != null ) {
+            q = newQueryIfNull( q );
+            q.setReversed( reversed );
+        }
+
+        return q;
+    }
+
+
+    public static Query fromUUID( UUID uuid ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.fromUUID( uuid ) );
+        return q;
+    }
+
+
+    public static Query fromIdentifier( Object id ) {
+        Query q = new Query();
+        q.addIdentifier( Identifier.from( id ) );
+        return q;
+    }
+
+
+    public boolean hasQueryPredicates() {
+        return rootOperand != null;
+    }
+
+
+    public boolean containsNameOrEmailIdentifiersOnly() {
+        if ( hasQueryPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+        for ( Identifier identifier : identifiers ) {
+            if ( !identifier.isEmail() && !identifier.isName() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    @JsonIgnore
+    public String getSingleNameOrEmailIdentifier() {
+        if ( !containsSingleNameOrEmailIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).toString() );
+    }
+
+
+    public boolean containsSingleNameOrEmailIdentifier() {
+        return containsNameOrEmailIdentifiersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    @JsonIgnore
+    public Identifier getSingleIdentifier() {
+        return identifiers != null && identifiers.size() == 1 ? identifiers.get( 0 ) : null;
+    }
+
+
+    public boolean containsSingleUuidIdentifier() {
+        return containsUuidIdentifiersOnly() && ( identifiers.size() == 1 );
+    }
+
+
+    boolean containsUuidIdentifiersOnly() {
+        if ( hasQueryPredicates() ) {
+            return false;
+        }
+        if ( ( identifiers == null ) || identifiers.isEmpty() ) {
+            return false;
+        }
+
+        for ( Identifier identifier : identifiers ) {
+            if ( !identifier.isUUID() ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    @JsonIgnore
+    public UUID getSingleUuidIdentifier() {
+        if ( !containsSingleUuidIdentifier() ) {
+            return null;
+        }
+        return ( identifiers.get( 0 ).getUUID() );
+    }
+
+
+    @JsonIgnore
+    boolean isIdsOnly() {
+        return false;
+    }
+
+    private void setIdsOnly( boolean idsOnly ) {
+        if ( idsOnly ) {
+            level = Level.IDS;
+        }
+        else if ( isIdsOnly() ) {
+            level = Level.ALL_PROPERTIES;
+        }
+    }
+
+
+    public Level getResultsLevel() {
+        isIdsOnly();
+        return level;
+    }
+
+
+    public void setResultsLevel( Level level ) {
+        setIdsOnly( level == Level.IDS );
+        this.level = level;
+    }
+
+
+    public Query withResultsLevel( Level level ) {
+        setIdsOnly( level == Level.IDS );
+        this.level = level;
+        return this;
+    }
+
+
+    public Query withReversed( boolean reversed ) {
+        setReversed( reversed );
+        return this;
+    }
+
+
+    public String getEntityType() {
+        return type;
+    }
+
+
+    public void setEntityType( String type ) {
+        this.type = type;
+    }
+
+    public List<String> getPermissions() {
+        return permissions;
+    }
+
+
+    public void setPermissions( List<String> permissions ) {
+        this.permissions = permissions;
+    }
+
+
+    public boolean isMergeSelectResults() {
+        return mergeSelectResults;
+    }
+
+
+
+    void setStartResult( UUID startResult ) {
+        this.startResult = startResult;
+    }
+
+
+    public Query withStartResult( UUID startResult ) {
+        this.startResult = startResult;
+        return this;
+    }
+
+
+    public UUID getStartResult() {
+        if ( ( startResult == null ) && ( cursor != null ) ) {
+            byte[] cursorBytes = Base64.decodeBase64( cursor );
+            if ( ( cursorBytes != null ) && ( cursorBytes.length == 16 ) ) {
+                startResult = ConversionUtils.uuid( cursorBytes );
+            }
+        }
+        return startResult;
+    }
+
+
+    public String getCursor() {
+        return cursor;
+    }
+
+
+    public void setCursor( String cursor ) {
+        this.cursor = cursor;
+    }
+
+
+    public Query withCursor( String cursor ) {
+        setCursor( cursor );
+        return this;
+    }
+
+
+    public int getLimit() {
+        return getLimit( DEFAULT_LIMIT );
+    }
+
+
+    public int getLimit( int defaultLimit ) {
+        if ( limit <= 0 ) {
+            if ( defaultLimit > 0 ) {
+                return defaultLimit;
+            }
+            else {
+                return DEFAULT_LIMIT;
+            }
+        }
+        return limit;
+    }
+
+
+    public void setLimit( int limit ) {
+
+        // TODO tnine.  After users have had time to change their query limits,
+        // this needs to be uncommented and enforced.
+        //    if(limit > MAX_LIMIT){
+        //        throw new IllegalArgumentException(
+        //            String.format("Query limit must be <= to %d", MAX_LIMIT));
+        //    }
+
+        if ( limit > MAX_LIMIT ) {
+            limit = MAX_LIMIT;
+        }
+
+        this.limit = limit;
+    }
+
+
+    public Query withLimit( int limit ) {
+        setLimit( limit );
+        return this;
+    }
+
+
+    public boolean isReversed() {
+        return reversed;
+    }
+
+
+    public void setReversed( boolean reversed ) {
+        reversedSet = true;
+        this.reversed = reversed;
+    }
+
+
+    public boolean isReversedSet() {
+        return reversedSet;
+    }
+
+
+    public Long getStartTime() {
+        return startTime;
+    }
+
+
+    public void setStartTime( Long startTime ) {
+        this.startTime = startTime;
+    }
+
+
+    public Long getFinishTime() {
+        return finishTime;
+    }
+
+
+    public void setFinishTime( Long finishTime ) {
+        this.finishTime = finishTime;
+    }
+
+
+    public boolean isPad() {
+        return pad;
+    }
+
+
+    public void setPad( boolean pad ) {
+        this.pad = pad;
+    }
+
+
+    public void setResolution( CounterResolution resolution ) {
+        this.resolution = resolution;
+    }
+
+
+    public CounterResolution getResolution() {
+        return resolution;
+    }
+
+
+    public void addIdentifier( Identifier identifier ) {
+        if ( identifiers == null ) {
+            identifiers = new ArrayList<Identifier>();
+        }
+        identifiers.add( identifier );
+    }
+
+
+    void setIdentifiers( List<Identifier> identifiers ) {
+        this.identifiers = identifiers;
+    }
+
+
+    public List<CounterFilterPredicate> getCounterFilters() {
+        return counterFilters;
+    }
+
+
+    public void addCounterFilter( String counter ) {
+        CounterFilterPredicate p = CounterFilterPredicate.fromString( counter );
+        if ( p == null ) {
+            return;
+        }
+        if ( counterFilters == null ) {
+            counterFilters = new ArrayList<CounterFilterPredicate>();
+        }
+        counterFilters.add( p );
+    }
+
+
+    void setCounterFilters( List<CounterFilterPredicate> counterFilters ) {
+        this.counterFilters = counterFilters;
+    }
+
+
+
+    public static final class CounterFilterPredicate implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+        private final String name;
+        private final Identifier user;
+        private final Identifier group;
+        private final String queue;
+        private final String category;
+
+
+        public CounterFilterPredicate( String name, Identifier user, Identifier group, String queue, String category ) {
+            this.name = name;
+            this.user = user;
+            this.group = group;
+            this.queue = queue;
+            this.category = category;
+        }
+
+
+        public Identifier getUser() {
+            return user;
+        }
+
+
+        public Identifier getGroup() {
+            return group;
+        }
+
+
+        public String getQueue() {
+            return queue;
+        }
+
+
+        public String getCategory() {
+            return category;
+        }
+
+
+        public String getName() {
+            return name;
+        }
+
+
+        public static CounterFilterPredicate fromString( String s ) {
+            Identifier user = null;
+            Identifier group = null;
+            String category = null;
+            String name = null;
+            String[] l = StringUtils.split( s, ':' );
+
+            if ( l.length > 0 ) {
+                if ( !"*".equals( l[0] ) ) {
+                    name = l[0];
+                }
+            }
+
+            if ( l.length > 1 ) {
+                if ( !"*".equals( l[1] ) ) {
+                    user = Identifier.from( l[1] );
+                }
+            }
+
+            if ( l.length > 2 ) {
+                if ( !"*".equals( l[2] ) ) {
+                    group = Identifier.from( l[3] );
+                }
+            }
+
+            if ( l.length > 3 ) {
+                if ( !"*".equals( l[3] ) ) {
+                    category = l[3];
+                }
+            }
+
+            if ( ( user == null ) && ( group == null ) && ( category == null ) && ( name == null)) {
+                return null;
+            }
+
+            return new CounterFilterPredicate( name, user, group, null, category );
+        }
+
+
+        public static List<CounterFilterPredicate> fromList( List<String> l ) {
+            if ( ( l == null ) || ( l.size() == 0 ) ) {
+                return null;
+            }
+            List<CounterFilterPredicate> counterFilters = new ArrayList<CounterFilterPredicate>();
+            for ( String s : l ) {
+                CounterFilterPredicate filter = CounterFilterPredicate.fromString( s );
+                if ( filter != null ) {
+                    counterFilters.add( filter );
+                }
+            }
+            if ( counterFilters.size() == 0 ) {
+                return null;
+            }
+            return counterFilters;
+        }
+    }
+
+
+//    public List<Object> getSelectionResults( Results rs ) {
+//
+//        List<Entity> entities = rs.getEntities();
+//        if ( entities == null ) {
+//            return null;
+//        }
+//
+//        if ( !hasSelectSubjects() ) {
+//            return cast( entities );
+//        }
+//
+//        List<Object> results = new ArrayList<Object>();
+//
+//        for ( Entity entity : entities ) {
+//            if ( isMergeSelectResults() ) {
+//                boolean include = false;
+//                Map<String, Object> result = new LinkedHashMap<String, Object>();
+//                Map<String, String> selects = getSelectAssignments();
+//                for ( Map.Entry<String, String> select : selects.entrySet() ) {
+//                    Object obj = JsonUtils.select( entity, select.getValue(), false );
+//                    if ( obj != null ) {
+//                        include = true;
+//                    }
+//                    result.put( select.getKey(), obj );
+//                }
+//                if ( include ) {
+//                    results.add( result );
+//                }
+//            }
+//            else {
+//                boolean include = false;
+//                List<Object> result = new ArrayList<Object>();
+//                Set<String> selects = getSelectSubjects();
+//                for ( String select : selects ) {
+//                    Object obj = JsonUtils.select( entity, select );
+//                    if ( obj != null ) {
+//                        include = true;
+//                    }
+//                    result.add( obj );
+//                }
+//                if ( include ) {
+//                    results.add( result );
+//                }
+//            }
+//        }
+//
+//        if ( results.size() == 0 ) {
+//            return null;
+//        }
+//
+//        return results;
+//    }
+
+
+//    public Object getSelectionResult( Results rs ) {
+//        List<Object> r = getSelectionResults( rs );
+//        if ( ( r != null ) && ( r.size() > 0 ) ) {
+//            return r.get( 0 );
+//        }
+//        return null;
+//    }
+
+
+    private static String decode( String input ) {
+        try {
+            return URLDecoder.decode( input, "UTF-8" );
+        }
+        catch ( UnsupportedEncodingException e ) {
+            // shouldn't happen, but just in case
+            throw new RuntimeException( e );
+        }
+    }
+
+
+    // note: very likely to be null
+    public String getCollection() {
+        return collection;
+    }
+
+
+    public void setCollection( String collection ) {
+        this.collection = collection;
+    }
+
+
+    // may be null
+    public String getQl() {
+        return ql;
+    }
+
+
+    public Query setQl( String ql ) {
+        this.ql = ql;
+        return this;
+    }
+
+
+    /**
+     * Get the connection type
+     * @return
+     */
+    public String getConnectionType() {
+        return connectionType;
+    }
+
+
+    /**
+     * Set the connection type
+     * @param connection
+     * @return
+     */
+    public Query setConnectionType( final String connection ) {
+        this.connectionType = connection;
+        return this;
+    }
+
+
+    public String getType() {
+        return type;
+    }
+
+
+    public Level getLevel() {
+        return level;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java
index f2a7d31..4f8ad18 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/QueryUtils.java
@@ -22,7 +22,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import static org.apache.usergrid.utils.ClassUtils.cast;
 import org.apache.usergrid.utils.JsonUtils;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/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 c543e75..52a4806 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
@@ -18,12 +18,12 @@ package org.apache.usergrid.persistence;
 
 
 import java.nio.ByteBuffer;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.apache.usergrid.persistence.Query;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-import org.apache.usergrid.persistence.index.query.Query.Level;
+import org.apache.usergrid.persistence.Query.Level;
 
 import me.prettyprint.hector.api.mutation.Mutator;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f95d39c7/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java
index f179000..e9e7a40 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Results.java
@@ -31,10 +31,7 @@ import java.util.UUID;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import org.apache.usergrid.corepersistence.results.QueryExecutor;
-import org.apache.usergrid.persistence.cassandra.QueryProcessor;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.index.query.Query.Level;
-import org.apache.usergrid.persistence.query.ir.SearchVisitor;
+import org.apache.usergrid.persistence.Query.Level;
 import org.apache.usergrid.utils.MapUtils;
 import org.apache.usergrid.utils.StringUtils;
 


Mime
View raw message